blob: a0b48c0b45011eb355f2fde655a2fe38cd1b830e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+sse2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE --check-prefix=SSE2 %s
; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX1 %s
; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX --check-prefix=AVX2 %s
; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512f -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512F %s
; RUN: opt -mtriple=x86_64-apple-darwin -mattr=+avx512dq -cost-model -analyze < %s | FileCheck --check-prefix=AVX512 --check-prefix=AVX512DQ %s
; CHECK-LABEL: 'uitofp_i8_double'
define i32 @uitofp_i8_double() {
; SSE2: cost of 1 {{.*}} uitofp i8
; AVX1: cost of 1 {{.*}} uitofp i8
; AVX2: cost of 1 {{.*}} uitofp i8
; AVX512: cost of 1 {{.*}} uitofp i8
%cvt_i8_f64 = uitofp i8 undef to double
; SSE2: cost of 20 {{.*}} uitofp <2 x i8>
; AVX1: cost of 4 {{.*}} uitofp <2 x i8>
; AVX2: cost of 4 {{.*}} uitofp <2 x i8>
; AVX512: cost of 2 {{.*}} uitofp <2 x i8>
%cvt_v2i8_v2f64 = uitofp <2 x i8> undef to <2 x double>
; SSE2: cost of 40 {{.*}} uitofp <4 x i8>
; AVX1: cost of 2 {{.*}} uitofp <4 x i8>
; AVX2: cost of 2 {{.*}} uitofp <4 x i8>
; AVX512: cost of 2 {{.*}} uitofp <4 x i8>
%cvt_v4i8_v4f64 = uitofp <4 x i8> undef to <4 x double>
; SSE2: cost of 80 {{.*}} uitofp <8 x i8>
; AVX1: cost of 5 {{.*}} uitofp <8 x i8>
; AVX2: cost of 5 {{.*}} uitofp <8 x i8>
; AVX512: cost of 2 {{.*}} uitofp <8 x i8>
%cvt_v8i8_v8f64 = uitofp <8 x i8> undef to <8 x double>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i16_double'
define i32 @uitofp_i16_double() {
; SSE2: cost of 1 {{.*}} uitofp i16
; AVX1: cost of 1 {{.*}} uitofp i16
; AVX2: cost of 1 {{.*}} uitofp i16
; AVX512: cost of 1 {{.*}} uitofp i16
%cvt_i16_f64 = uitofp i16 undef to double
; SSE2: cost of 20 {{.*}} uitofp <2 x i16>
; AVX1: cost of 4 {{.*}} uitofp <2 x i16>
; AVX2: cost of 4 {{.*}} uitofp <2 x i16>
; AVX512: cost of 5 {{.*}} uitofp <2 x i16>
%cvt_v2i16_v2f64 = uitofp <2 x i16> undef to <2 x double>
; SSE2: cost of 40 {{.*}} uitofp <4 x i16>
; AVX1: cost of 2 {{.*}} uitofp <4 x i16>
; AVX2: cost of 2 {{.*}} uitofp <4 x i16>
; AVX512: cost of 2 {{.*}} uitofp <4 x i16>
%cvt_v4i16_v4f64 = uitofp <4 x i16> undef to <4 x double>
; SSE2: cost of 80 {{.*}} uitofp <8 x i16>
; AVX1: cost of 5 {{.*}} uitofp <8 x i16>
; AVX2: cost of 5 {{.*}} uitofp <8 x i16>
; AVX512: cost of 2 {{.*}} uitofp <8 x i16>
%cvt_v8i16_v8f64 = uitofp <8 x i16> undef to <8 x double>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i32_double'
define i32 @uitofp_i32_double() {
; SSE2: cost of 1 {{.*}} uitofp i32
; AVX1: cost of 1 {{.*}} uitofp i32
; AVX2: cost of 1 {{.*}} uitofp i32
; AVX512: cost of 1 {{.*}} uitofp i32
%cvt_i32_f64 = uitofp i32 undef to double
; SSE2: cost of 20 {{.*}} uitofp <2 x i32>
; AVX1: cost of 6 {{.*}} uitofp <2 x i32>
; AVX2: cost of 6 {{.*}} uitofp <2 x i32>
; AVX512: cost of 1 {{.*}} uitofp <2 x i32>
%cvt_v2i32_v2f64 = uitofp <2 x i32> undef to <2 x double>
; SSE2: cost of 40 {{.*}} uitofp <4 x i32>
; AVX1: cost of 6 {{.*}} uitofp <4 x i32>
; AVX2: cost of 6 {{.*}} uitofp <4 x i32>
; AVX512: cost of 1 {{.*}} uitofp <4 x i32>
%cvt_v4i32_v4f64 = uitofp <4 x i32> undef to <4 x double>
; SSE2: cost of 80 {{.*}} uitofp <8 x i32>
; AVX1: cost of 13 {{.*}} uitofp <8 x i32>
; AVX2: cost of 13 {{.*}} uitofp <8 x i32>
; AVX512: cost of 1 {{.*}} uitofp <8 x i32>
%cvt_v8i32_v8f64 = uitofp <8 x i32> undef to <8 x double>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i64_double'
define i32 @uitofp_i64_double() {
; SSE2: cost of 1 {{.*}} uitofp i64
; AVX1: cost of 1 {{.*}} uitofp i64
; AVX2: cost of 1 {{.*}} uitofp i64
; AVX512: cost of 1 {{.*}} uitofp i64
%cvt_i64_f64 = uitofp i64 undef to double
; SSE2: cost of 20 {{.*}} uitofp <2 x i64>
; AVX1: cost of 10 {{.*}} uitofp <2 x i64>
; AVX2: cost of 10 {{.*}} uitofp <2 x i64>
; AVX512F: cost of 5 {{.*}} uitofp <2 x i64>
; AVX512DQ: cost of 1 {{.*}} uitofp <2 x i64>
%cvt_v2i64_v2f64 = uitofp <2 x i64> undef to <2 x double>
; SSE2: cost of 40 {{.*}} uitofp <4 x i64>
; AVX1: cost of 20 {{.*}} uitofp <4 x i64>
; AVX2: cost of 20 {{.*}} uitofp <4 x i64>
; AVX512F: cost of 12 {{.*}} uitofp <4 x i64>
; AVX512DQ: cost of 1 {{.*}} uitofp <4 x i64>
%cvt_v4i64_v4f64 = uitofp <4 x i64> undef to <4 x double>
; SSE2: cost of 80 {{.*}} uitofp <8 x i64>
; AVX1: cost of 41 {{.*}} uitofp <8 x i64>
; AVX2: cost of 41 {{.*}} uitofp <8 x i64>
; AVX512F: cost of 26 {{.*}} uitofp <8 x i64>
; AVX512DQ: cost of 1 {{.*}} uitofp <8 x i64>
%cvt_v8i64_v8f64 = uitofp <8 x i64> undef to <8 x double>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i8_float'
define i32 @uitofp_i8_float() {
; SSE2: cost of 1 {{.*}} uitofp i8
; AVX1: cost of 1 {{.*}} uitofp i8
; AVX2: cost of 1 {{.*}} uitofp i8
; AVX512: cost of 1 {{.*}} uitofp i8
%cvt_i8_f32 = uitofp i8 undef to float
; SSE2: cost of 8 {{.*}} uitofp <4 x i8>
; AVX1: cost of 2 {{.*}} uitofp <4 x i8>
; AVX2: cost of 2 {{.*}} uitofp <4 x i8>
; AVX512: cost of 2 {{.*}} uitofp <4 x i8>
%cvt_v4i8_v4f32 = uitofp <4 x i8> undef to <4 x float>
; SSE2: cost of 15 {{.*}} uitofp <8 x i8>
; AVX1: cost of 5 {{.*}} uitofp <8 x i8>
; AVX2: cost of 5 {{.*}} uitofp <8 x i8>
; AVX512: cost of 2 {{.*}} uitofp <8 x i8>
%cvt_v8i8_v8f32 = uitofp <8 x i8> undef to <8 x float>
; SSE2: cost of 8 {{.*}} uitofp <16 x i8>
; AVX1: cost of 11 {{.*}} uitofp <16 x i8>
; AVX16: cost of 11 {{.*}} uitofp <16 x i8>
; AVX512: cost of 2 {{.*}} uitofp <16 x i8>
%cvt_v16i8_v16f32 = uitofp <16 x i8> undef to <16 x float>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i16_float'
define i32 @uitofp_i16_float() {
; SSE2: cost of 1 {{.*}} uitofp i16
; AVX1: cost of 1 {{.*}} uitofp i16
; AVX2: cost of 1 {{.*}} uitofp i16
; AVX512: cost of 1 {{.*}} uitofp i16
%cvt_i16_f32 = uitofp i16 undef to float
; SSE2: cost of 8 {{.*}} uitofp <4 x i16>
; AVX1: cost of 2 {{.*}} uitofp <4 x i16>
; AVX2: cost of 2 {{.*}} uitofp <4 x i16>
; AVX512: cost of 2 {{.*}} uitofp <4 x i16>
%cvt_v4i16_v4f32 = uitofp <4 x i16> undef to <4 x float>
; SSE2: cost of 15 {{.*}} uitofp <8 x i16>
; AVX1: cost of 5 {{.*}} uitofp <8 x i16>
; AVX2: cost of 5 {{.*}} uitofp <8 x i16>
; AVX512: cost of 2 {{.*}} uitofp <8 x i16>
%cvt_v8i16_v8f32 = uitofp <8 x i16> undef to <8 x float>
; SSE2: cost of 30 {{.*}} uitofp <16 x i16>
; AVX1: cost of 11 {{.*}} uitofp <16 x i16>
; AVX16: cost of 11 {{.*}} uitofp <16 x i16>
; AVX512: cost of 2 {{.*}} uitofp <16 x i16>
%cvt_v16i16_v16f32 = uitofp <16 x i16> undef to <16 x float>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i32_float'
define i32 @uitofp_i32_float() {
; SSE2: cost of 1 {{.*}} uitofp i32
; AVX1: cost of 1 {{.*}} uitofp i32
; AVX2: cost of 1 {{.*}} uitofp i32
; AVX512: cost of 1 {{.*}} uitofp i32
%cvt_i32_f32 = uitofp i32 undef to float
; SSE2: cost of 8 {{.*}} uitofp <4 x i32>
; AVX1: cost of 6 {{.*}} uitofp <4 x i32>
; AVX2: cost of 6 {{.*}} uitofp <4 x i32>
; AVX512: cost of 1 {{.*}} uitofp <4 x i32>
%cvt_v4i32_v4f32 = uitofp <4 x i32> undef to <4 x float>
; SSE2: cost of 16 {{.*}} uitofp <8 x i32>
; AVX1: cost of 9 {{.*}} uitofp <8 x i32>
; AVX2: cost of 8 {{.*}} uitofp <8 x i32>
; AVX512: cost of 1 {{.*}} uitofp <8 x i32>
%cvt_v8i32_v8f32 = uitofp <8 x i32> undef to <8 x float>
; SSE2: cost of 32 {{.*}} uitofp <16 x i32>
; AVX1: cost of 19 {{.*}} uitofp <16 x i32>
; AVX2: cost of 17 {{.*}} uitofp <16 x i32>
; AVX512: cost of 1 {{.*}} uitofp <16 x i32>
%cvt_v16i32_v16f32 = uitofp <16 x i32> undef to <16 x float>
ret i32 undef
}
; CHECK-LABEL: 'uitofp_i64_float'
define i32 @uitofp_i64_float() {
; SSE2: cost of 1 {{.*}} uitofp i64
; AVX1: cost of 1 {{.*}} uitofp i64
; AVX2: cost of 1 {{.*}} uitofp i64
; AVX512: cost of 1 {{.*}} uitofp i64
%cvt_i64_f32 = uitofp i64 undef to float
; SSE2: cost of 15 {{.*}} uitofp <2 x i64>
; AVX1: cost of 4 {{.*}} uitofp <2 x i64>
; AVX2: cost of 4 {{.*}} uitofp <2 x i64>
; AVX512F: cost of 5 {{.*}} uitofp <2 x i64>
; AVX512DQ: cost of 1 {{.*}} uitofp <2 x i64>
%cvt_v2i64_v2f32 = uitofp <2 x i64> undef to <2 x float>
; SSE2: cost of 30 {{.*}} uitofp <4 x i64>
; AVX1: cost of 10 {{.*}} uitofp <4 x i64>
; AVX2: cost of 10 {{.*}} uitofp <4 x i64>
; AVX512F: cost of 10 {{.*}} uitofp <4 x i64>
; AVX512DQ: cost of 1 {{.*}} uitofp <4 x i64>
%cvt_v4i64_v4f32 = uitofp <4 x i64> undef to <4 x float>
; SSE2: cost of 60 {{.*}} uitofp <8 x i64>
; AVX1: cost of 21 {{.*}} uitofp <8 x i64>
; AVX2: cost of 21 {{.*}} uitofp <8 x i64>
; AVX512F: cost of 26 {{.*}} uitofp <8 x i64>
; AVX512DQ: cost of 1 {{.*}} uitofp <8 x i64>
%cvt_v8i64_v8f32 = uitofp <8 x i64> undef to <8 x float>
; SSE2: cost of 120 {{.*}} uitofp <16 x i64>
; AVX1: cost of 43 {{.*}} uitofp <16 x i64>
; AVX2: cost of 43 {{.*}} uitofp <16 x i64>
; AVX512F: cost of 53 {{.*}} uitofp <16 x i64>
; AVX512DQ: cost of 3 {{.*}} uitofp <16 x i64>
%cvt_v16i64_v16f32 = uitofp <16 x i64> undef to <16 x float>
ret i32 undef
}
|