1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=ALL,SSE,SSE2
3 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=ALL,SSE,SSE41
4 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=ALL,AVX,VEX,AVX1
5 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=ALL,AVX,VEX,AVX2
6 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=ALL,AVX,AVX512,AVX512F
7 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefixes=ALL,AVX,AVX512,AVX512VL
8 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512dq | FileCheck %s --check-prefixes=ALL,AVX,AVX512,AVX512DQ
9 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512dq,+avx512vl | FileCheck %s --check-prefixes=ALL,AVX,AVX512,AVX512VLDQ
11 ; 32-bit tests to make sure we're not doing anything stupid.
12 ; RUN: llc < %s -disable-peephole -mtriple=i686-unknown-unknown
13 ; RUN: llc < %s -disable-peephole -mtriple=i686-unknown-unknown -mattr=+sse
14 ; RUN: llc < %s -disable-peephole -mtriple=i686-unknown-unknown -mattr=+sse2
15 ; RUN: llc < %s -disable-peephole -mtriple=i686-unknown-unknown -mattr=+sse4.1
18 ; Signed Integer to Double
21 define <2 x double> @sitofp_2i64_to_2f64(<2 x i64> %a) {
22 ; SSE2-LABEL: sitofp_2i64_to_2f64:
24 ; SSE2-NEXT: movq %xmm0, %rax
25 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
26 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
27 ; SSE2-NEXT: movq %xmm0, %rax
28 ; SSE2-NEXT: xorps %xmm0, %xmm0
29 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
30 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm0[0]
31 ; SSE2-NEXT: movaps %xmm1, %xmm0
34 ; SSE41-LABEL: sitofp_2i64_to_2f64:
36 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
37 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
38 ; SSE41-NEXT: movq %xmm0, %rax
39 ; SSE41-NEXT: xorps %xmm0, %xmm0
40 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
41 ; SSE41-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
44 ; VEX-LABEL: sitofp_2i64_to_2f64:
46 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
47 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
48 ; VEX-NEXT: vmovq %xmm0, %rax
49 ; VEX-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
50 ; VEX-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
53 ; AVX512F-LABEL: sitofp_2i64_to_2f64:
55 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
56 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
57 ; AVX512F-NEXT: vmovq %xmm0, %rax
58 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
59 ; AVX512F-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
62 ; AVX512VL-LABEL: sitofp_2i64_to_2f64:
64 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
65 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
66 ; AVX512VL-NEXT: vmovq %xmm0, %rax
67 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
68 ; AVX512VL-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
71 ; AVX512DQ-LABEL: sitofp_2i64_to_2f64:
73 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
74 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
75 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
76 ; AVX512DQ-NEXT: vzeroupper
79 ; AVX512VLDQ-LABEL: sitofp_2i64_to_2f64:
80 ; AVX512VLDQ: # %bb.0:
81 ; AVX512VLDQ-NEXT: vcvtqq2pd %xmm0, %xmm0
82 ; AVX512VLDQ-NEXT: retq
83 %cvt = sitofp <2 x i64> %a to <2 x double>
87 define <2 x double> @sitofp_2i32_to_2f64(<4 x i32> %a) {
88 ; SSE-LABEL: sitofp_2i32_to_2f64:
90 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
93 ; AVX-LABEL: sitofp_2i32_to_2f64:
95 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
97 %shuf = shufflevector <4 x i32> %a, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
98 %cvt = sitofp <2 x i32> %shuf to <2 x double>
102 define <2 x double> @sitofp_4i32_to_2f64(<4 x i32> %a) {
103 ; SSE-LABEL: sitofp_4i32_to_2f64:
105 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
108 ; AVX-LABEL: sitofp_4i32_to_2f64:
110 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
112 %cvt = sitofp <4 x i32> %a to <4 x double>
113 %shuf = shufflevector <4 x double> %cvt, <4 x double> undef, <2 x i32> <i32 0, i32 1>
114 ret <2 x double> %shuf
117 define <2 x double> @sitofp_2i16_to_2f64(<8 x i16> %a) {
118 ; SSE2-LABEL: sitofp_2i16_to_2f64:
120 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
121 ; SSE2-NEXT: psrad $16, %xmm0
122 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
125 ; SSE41-LABEL: sitofp_2i16_to_2f64:
127 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
128 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
131 ; AVX-LABEL: sitofp_2i16_to_2f64:
133 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
134 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
136 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <2 x i32> <i32 0, i32 1>
137 %cvt = sitofp <2 x i16> %shuf to <2 x double>
138 ret <2 x double> %cvt
141 define <2 x double> @sitofp_8i16_to_2f64(<8 x i16> %a) {
142 ; SSE2-LABEL: sitofp_8i16_to_2f64:
144 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
145 ; SSE2-NEXT: psrad $16, %xmm0
146 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
149 ; SSE41-LABEL: sitofp_8i16_to_2f64:
151 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
152 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
155 ; VEX-LABEL: sitofp_8i16_to_2f64:
157 ; VEX-NEXT: vpmovsxwd %xmm0, %xmm0
158 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
161 ; AVX512-LABEL: sitofp_8i16_to_2f64:
163 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
164 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
165 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
166 ; AVX512-NEXT: vzeroupper
168 %cvt = sitofp <8 x i16> %a to <8 x double>
169 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <2 x i32> <i32 0, i32 1>
170 ret <2 x double> %shuf
173 define <2 x double> @sitofp_2i8_to_2f64(<16 x i8> %a) {
174 ; SSE2-LABEL: sitofp_2i8_to_2f64:
176 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
177 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
178 ; SSE2-NEXT: psrad $24, %xmm0
179 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
182 ; SSE41-LABEL: sitofp_2i8_to_2f64:
184 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
185 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
188 ; AVX-LABEL: sitofp_2i8_to_2f64:
190 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
191 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
193 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <2 x i32> <i32 0, i32 1>
194 %cvt = sitofp <2 x i8> %shuf to <2 x double>
195 ret <2 x double> %cvt
198 define <2 x double> @sitofp_16i8_to_2f64(<16 x i8> %a) {
199 ; SSE2-LABEL: sitofp_16i8_to_2f64:
201 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
202 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
203 ; SSE2-NEXT: psrad $24, %xmm0
204 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
207 ; SSE41-LABEL: sitofp_16i8_to_2f64:
209 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
210 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
213 ; VEX-LABEL: sitofp_16i8_to_2f64:
215 ; VEX-NEXT: vpmovsxbd %xmm0, %xmm0
216 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
219 ; AVX512-LABEL: sitofp_16i8_to_2f64:
221 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
222 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
223 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
224 ; AVX512-NEXT: vzeroupper
226 %cvt = sitofp <16 x i8> %a to <16 x double>
227 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <2 x i32> <i32 0, i32 1>
228 ret <2 x double> %shuf
231 define <4 x double> @sitofp_4i64_to_4f64(<4 x i64> %a) {
232 ; SSE2-LABEL: sitofp_4i64_to_4f64:
234 ; SSE2-NEXT: movq %xmm0, %rax
235 ; SSE2-NEXT: cvtsi2sd %rax, %xmm2
236 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
237 ; SSE2-NEXT: movq %xmm0, %rax
238 ; SSE2-NEXT: xorps %xmm0, %xmm0
239 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
240 ; SSE2-NEXT: movlhps {{.*#+}} xmm2 = xmm2[0],xmm0[0]
241 ; SSE2-NEXT: movq %xmm1, %rax
242 ; SSE2-NEXT: cvtsi2sd %rax, %xmm3
243 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,0,1]
244 ; SSE2-NEXT: movq %xmm0, %rax
245 ; SSE2-NEXT: xorps %xmm0, %xmm0
246 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
247 ; SSE2-NEXT: movlhps {{.*#+}} xmm3 = xmm3[0],xmm0[0]
248 ; SSE2-NEXT: movaps %xmm2, %xmm0
249 ; SSE2-NEXT: movaps %xmm3, %xmm1
252 ; SSE41-LABEL: sitofp_4i64_to_4f64:
254 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
255 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
256 ; SSE41-NEXT: movq %xmm0, %rax
257 ; SSE41-NEXT: xorps %xmm0, %xmm0
258 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
259 ; SSE41-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
260 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
261 ; SSE41-NEXT: xorps %xmm2, %xmm2
262 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
263 ; SSE41-NEXT: movq %xmm1, %rax
264 ; SSE41-NEXT: xorps %xmm1, %xmm1
265 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
266 ; SSE41-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
269 ; AVX1-LABEL: sitofp_4i64_to_4f64:
271 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
272 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
273 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
274 ; AVX1-NEXT: vmovq %xmm1, %rax
275 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
276 ; AVX1-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
277 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
278 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
279 ; AVX1-NEXT: vmovq %xmm0, %rax
280 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
281 ; AVX1-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
282 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
285 ; AVX2-LABEL: sitofp_4i64_to_4f64:
287 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
288 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
289 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
290 ; AVX2-NEXT: vmovq %xmm1, %rax
291 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
292 ; AVX2-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
293 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
294 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
295 ; AVX2-NEXT: vmovq %xmm0, %rax
296 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
297 ; AVX2-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
298 ; AVX2-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
301 ; AVX512F-LABEL: sitofp_4i64_to_4f64:
303 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm1
304 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
305 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
306 ; AVX512F-NEXT: vmovq %xmm1, %rax
307 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
308 ; AVX512F-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
309 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
310 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
311 ; AVX512F-NEXT: vmovq %xmm0, %rax
312 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
313 ; AVX512F-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
314 ; AVX512F-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
317 ; AVX512VL-LABEL: sitofp_4i64_to_4f64:
319 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm1
320 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
321 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
322 ; AVX512VL-NEXT: vmovq %xmm1, %rax
323 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
324 ; AVX512VL-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
325 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
326 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
327 ; AVX512VL-NEXT: vmovq %xmm0, %rax
328 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
329 ; AVX512VL-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
330 ; AVX512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
331 ; AVX512VL-NEXT: retq
333 ; AVX512DQ-LABEL: sitofp_4i64_to_4f64:
335 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
336 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
337 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
338 ; AVX512DQ-NEXT: retq
340 ; AVX512VLDQ-LABEL: sitofp_4i64_to_4f64:
341 ; AVX512VLDQ: # %bb.0:
342 ; AVX512VLDQ-NEXT: vcvtqq2pd %ymm0, %ymm0
343 ; AVX512VLDQ-NEXT: retq
344 %cvt = sitofp <4 x i64> %a to <4 x double>
345 ret <4 x double> %cvt
348 define <4 x double> @sitofp_4i32_to_4f64(<4 x i32> %a) {
349 ; SSE-LABEL: sitofp_4i32_to_4f64:
351 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm2
352 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
353 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm1
354 ; SSE-NEXT: movaps %xmm2, %xmm0
357 ; AVX-LABEL: sitofp_4i32_to_4f64:
359 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
361 %cvt = sitofp <4 x i32> %a to <4 x double>
362 ret <4 x double> %cvt
365 define <4 x double> @sitofp_4i16_to_4f64(<8 x i16> %a) {
366 ; SSE2-LABEL: sitofp_4i16_to_4f64:
368 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
369 ; SSE2-NEXT: psrad $16, %xmm1
370 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
371 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
372 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
375 ; SSE41-LABEL: sitofp_4i16_to_4f64:
377 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm1
378 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
379 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
380 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
383 ; AVX-LABEL: sitofp_4i16_to_4f64:
385 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
386 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
388 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
389 %cvt = sitofp <4 x i16> %shuf to <4 x double>
390 ret <4 x double> %cvt
393 define <4 x double> @sitofp_8i16_to_4f64(<8 x i16> %a) {
394 ; SSE2-LABEL: sitofp_8i16_to_4f64:
396 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
397 ; SSE2-NEXT: psrad $16, %xmm1
398 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
399 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
400 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
403 ; SSE41-LABEL: sitofp_8i16_to_4f64:
405 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm1
406 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
407 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
408 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
411 ; VEX-LABEL: sitofp_8i16_to_4f64:
413 ; VEX-NEXT: vpmovsxwd %xmm0, %xmm0
414 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
417 ; AVX512-LABEL: sitofp_8i16_to_4f64:
419 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
420 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
421 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
423 %cvt = sitofp <8 x i16> %a to <8 x double>
424 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
425 ret <4 x double> %shuf
428 define <4 x double> @sitofp_4i8_to_4f64(<16 x i8> %a) {
429 ; SSE2-LABEL: sitofp_4i8_to_4f64:
431 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
432 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
433 ; SSE2-NEXT: psrad $24, %xmm1
434 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
435 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
436 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
439 ; SSE41-LABEL: sitofp_4i8_to_4f64:
441 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
442 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
443 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
444 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
447 ; AVX-LABEL: sitofp_4i8_to_4f64:
449 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
450 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
452 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
453 %cvt = sitofp <4 x i8> %shuf to <4 x double>
454 ret <4 x double> %cvt
457 define <4 x double> @sitofp_16i8_to_4f64(<16 x i8> %a) {
458 ; SSE2-LABEL: sitofp_16i8_to_4f64:
460 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
461 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
462 ; SSE2-NEXT: psrad $24, %xmm1
463 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
464 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
465 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
468 ; SSE41-LABEL: sitofp_16i8_to_4f64:
470 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
471 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
472 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
473 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
476 ; VEX-LABEL: sitofp_16i8_to_4f64:
478 ; VEX-NEXT: vpmovsxbd %xmm0, %xmm0
479 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
482 ; AVX512-LABEL: sitofp_16i8_to_4f64:
484 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
485 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
486 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
488 %cvt = sitofp <16 x i8> %a to <16 x double>
489 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
490 ret <4 x double> %shuf
494 ; Unsigned Integer to Double
497 define <2 x double> @uitofp_2i64_to_2f64(<2 x i64> %a) {
498 ; SSE2-LABEL: uitofp_2i64_to_2f64:
500 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [4294967295,4294967295]
501 ; SSE2-NEXT: pand %xmm0, %xmm1
502 ; SSE2-NEXT: por {{.*}}(%rip), %xmm1
503 ; SSE2-NEXT: psrlq $32, %xmm0
504 ; SSE2-NEXT: por {{.*}}(%rip), %xmm0
505 ; SSE2-NEXT: subpd {{.*}}(%rip), %xmm0
506 ; SSE2-NEXT: addpd %xmm1, %xmm0
509 ; SSE41-LABEL: uitofp_2i64_to_2f64:
511 ; SSE41-NEXT: pxor %xmm1, %xmm1
512 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
513 ; SSE41-NEXT: por {{.*}}(%rip), %xmm1
514 ; SSE41-NEXT: psrlq $32, %xmm0
515 ; SSE41-NEXT: por {{.*}}(%rip), %xmm0
516 ; SSE41-NEXT: subpd {{.*}}(%rip), %xmm0
517 ; SSE41-NEXT: addpd %xmm1, %xmm0
520 ; AVX1-LABEL: uitofp_2i64_to_2f64:
522 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
523 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
524 ; AVX1-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
525 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm0
526 ; AVX1-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
527 ; AVX1-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
528 ; AVX1-NEXT: vaddpd %xmm0, %xmm1, %xmm0
531 ; AVX2-LABEL: uitofp_2i64_to_2f64:
533 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
534 ; AVX2-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
535 ; AVX2-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
536 ; AVX2-NEXT: vpsrlq $32, %xmm0, %xmm0
537 ; AVX2-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
538 ; AVX2-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
539 ; AVX2-NEXT: vaddpd %xmm0, %xmm1, %xmm0
542 ; AVX512F-LABEL: uitofp_2i64_to_2f64:
544 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
545 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
546 ; AVX512F-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
547 ; AVX512F-NEXT: vpsrlq $32, %xmm0, %xmm0
548 ; AVX512F-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
549 ; AVX512F-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
550 ; AVX512F-NEXT: vaddpd %xmm0, %xmm1, %xmm0
553 ; AVX512VL-LABEL: uitofp_2i64_to_2f64:
555 ; AVX512VL-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm1
556 ; AVX512VL-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
557 ; AVX512VL-NEXT: vpsrlq $32, %xmm0, %xmm0
558 ; AVX512VL-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
559 ; AVX512VL-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
560 ; AVX512VL-NEXT: vaddpd %xmm0, %xmm1, %xmm0
561 ; AVX512VL-NEXT: retq
563 ; AVX512DQ-LABEL: uitofp_2i64_to_2f64:
565 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
566 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
567 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
568 ; AVX512DQ-NEXT: vzeroupper
569 ; AVX512DQ-NEXT: retq
571 ; AVX512VLDQ-LABEL: uitofp_2i64_to_2f64:
572 ; AVX512VLDQ: # %bb.0:
573 ; AVX512VLDQ-NEXT: vcvtuqq2pd %xmm0, %xmm0
574 ; AVX512VLDQ-NEXT: retq
575 %cvt = uitofp <2 x i64> %a to <2 x double>
576 ret <2 x double> %cvt
579 define <2 x double> @uitofp_2i32_to_2f64(<4 x i32> %a) {
580 ; SSE2-LABEL: uitofp_2i32_to_2f64:
582 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,0,65535,0,0,0,0,0]
583 ; SSE2-NEXT: pand %xmm0, %xmm1
584 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
585 ; SSE2-NEXT: psrld $16, %xmm0
586 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
587 ; SSE2-NEXT: mulpd {{.*}}(%rip), %xmm0
588 ; SSE2-NEXT: addpd %xmm1, %xmm0
591 ; SSE41-LABEL: uitofp_2i32_to_2f64:
593 ; SSE41-NEXT: pxor %xmm1, %xmm1
594 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
595 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
596 ; SSE41-NEXT: psrld $16, %xmm0
597 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
598 ; SSE41-NEXT: mulpd {{.*}}(%rip), %xmm0
599 ; SSE41-NEXT: addpd %xmm1, %xmm0
602 ; VEX-LABEL: uitofp_2i32_to_2f64:
604 ; VEX-NEXT: vpxor %xmm1, %xmm1, %xmm1
605 ; VEX-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
606 ; VEX-NEXT: vcvtdq2pd %xmm1, %xmm1
607 ; VEX-NEXT: vpsrld $16, %xmm0, %xmm0
608 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
609 ; VEX-NEXT: vmulpd {{.*}}(%rip), %xmm0, %xmm0
610 ; VEX-NEXT: vaddpd %xmm1, %xmm0, %xmm0
613 ; AVX512F-LABEL: uitofp_2i32_to_2f64:
615 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
616 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
617 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
618 ; AVX512F-NEXT: vzeroupper
621 ; AVX512VL-LABEL: uitofp_2i32_to_2f64:
623 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
624 ; AVX512VL-NEXT: retq
626 ; AVX512DQ-LABEL: uitofp_2i32_to_2f64:
628 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
629 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
630 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
631 ; AVX512DQ-NEXT: vzeroupper
632 ; AVX512DQ-NEXT: retq
634 ; AVX512VLDQ-LABEL: uitofp_2i32_to_2f64:
635 ; AVX512VLDQ: # %bb.0:
636 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
637 ; AVX512VLDQ-NEXT: retq
638 %shuf = shufflevector <4 x i32> %a, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
639 %cvt = uitofp <2 x i32> %shuf to <2 x double>
640 ret <2 x double> %cvt
643 define <2 x double> @uitofp_4i32_to_2f64(<4 x i32> %a) {
644 ; SSE2-LABEL: uitofp_4i32_to_2f64:
646 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,0,65535,0,0,0,0,0]
647 ; SSE2-NEXT: pand %xmm0, %xmm1
648 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
649 ; SSE2-NEXT: psrld $16, %xmm0
650 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
651 ; SSE2-NEXT: mulpd {{.*}}(%rip), %xmm0
652 ; SSE2-NEXT: addpd %xmm1, %xmm0
655 ; SSE41-LABEL: uitofp_4i32_to_2f64:
657 ; SSE41-NEXT: pxor %xmm1, %xmm1
658 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
659 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
660 ; SSE41-NEXT: psrld $16, %xmm0
661 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
662 ; SSE41-NEXT: mulpd {{.*}}(%rip), %xmm0
663 ; SSE41-NEXT: addpd %xmm1, %xmm0
666 ; VEX-LABEL: uitofp_4i32_to_2f64:
668 ; VEX-NEXT: vpxor %xmm1, %xmm1, %xmm1
669 ; VEX-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
670 ; VEX-NEXT: vpsrld $16, %xmm0, %xmm0
671 ; VEX-NEXT: vcvtdq2pd %xmm1, %xmm1
672 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
673 ; VEX-NEXT: vmulpd {{.*}}(%rip), %xmm0, %xmm0
674 ; VEX-NEXT: vaddpd %xmm1, %xmm0, %xmm0
677 ; AVX512F-LABEL: uitofp_4i32_to_2f64:
679 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
680 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
681 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
682 ; AVX512F-NEXT: vzeroupper
685 ; AVX512VL-LABEL: uitofp_4i32_to_2f64:
687 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
688 ; AVX512VL-NEXT: retq
690 ; AVX512DQ-LABEL: uitofp_4i32_to_2f64:
692 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
693 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
694 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
695 ; AVX512DQ-NEXT: vzeroupper
696 ; AVX512DQ-NEXT: retq
698 ; AVX512VLDQ-LABEL: uitofp_4i32_to_2f64:
699 ; AVX512VLDQ: # %bb.0:
700 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
701 ; AVX512VLDQ-NEXT: retq
702 %cvt = uitofp <4 x i32> %a to <4 x double>
703 %shuf = shufflevector <4 x double> %cvt, <4 x double> undef, <2 x i32> <i32 0, i32 1>
704 ret <2 x double> %shuf
707 define <2 x double> @uitofp_2i16_to_2f64(<8 x i16> %a) {
708 ; SSE2-LABEL: uitofp_2i16_to_2f64:
710 ; SSE2-NEXT: pxor %xmm1, %xmm1
711 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
712 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
715 ; SSE41-LABEL: uitofp_2i16_to_2f64:
717 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
718 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
721 ; AVX-LABEL: uitofp_2i16_to_2f64:
723 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
724 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
726 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <2 x i32> <i32 0, i32 1>
727 %cvt = uitofp <2 x i16> %shuf to <2 x double>
728 ret <2 x double> %cvt
731 define <2 x double> @uitofp_8i16_to_2f64(<8 x i16> %a) {
732 ; SSE2-LABEL: uitofp_8i16_to_2f64:
734 ; SSE2-NEXT: pxor %xmm1, %xmm1
735 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
736 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
739 ; SSE41-LABEL: uitofp_8i16_to_2f64:
741 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
742 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
745 ; VEX-LABEL: uitofp_8i16_to_2f64:
747 ; VEX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
748 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
751 ; AVX512-LABEL: uitofp_8i16_to_2f64:
753 ; AVX512-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
754 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
755 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
756 ; AVX512-NEXT: vzeroupper
758 %cvt = uitofp <8 x i16> %a to <8 x double>
759 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <2 x i32> <i32 0, i32 1>
760 ret <2 x double> %shuf
763 define <2 x double> @uitofp_2i8_to_2f64(<16 x i8> %a) {
764 ; SSE2-LABEL: uitofp_2i8_to_2f64:
766 ; SSE2-NEXT: pxor %xmm1, %xmm1
767 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
768 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
769 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
772 ; SSE41-LABEL: uitofp_2i8_to_2f64:
774 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
775 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
778 ; AVX-LABEL: uitofp_2i8_to_2f64:
780 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
781 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
783 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <2 x i32> <i32 0, i32 1>
784 %cvt = uitofp <2 x i8> %shuf to <2 x double>
785 ret <2 x double> %cvt
788 define <2 x double> @uitofp_16i8_to_2f64(<16 x i8> %a) {
789 ; SSE2-LABEL: uitofp_16i8_to_2f64:
791 ; SSE2-NEXT: pxor %xmm1, %xmm1
792 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
793 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
794 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
797 ; SSE41-LABEL: uitofp_16i8_to_2f64:
799 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
800 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
803 ; VEX-LABEL: uitofp_16i8_to_2f64:
805 ; VEX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
806 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
809 ; AVX512-LABEL: uitofp_16i8_to_2f64:
811 ; AVX512-NEXT: vpmovzxbd {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero,xmm0[8],zero,zero,zero,xmm0[9],zero,zero,zero,xmm0[10],zero,zero,zero,xmm0[11],zero,zero,zero,xmm0[12],zero,zero,zero,xmm0[13],zero,zero,zero,xmm0[14],zero,zero,zero,xmm0[15],zero,zero,zero
812 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
813 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
814 ; AVX512-NEXT: vzeroupper
816 %cvt = uitofp <16 x i8> %a to <16 x double>
817 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <2 x i32> <i32 0, i32 1>
818 ret <2 x double> %shuf
821 define <4 x double> @uitofp_4i64_to_4f64(<4 x i64> %a) {
822 ; SSE2-LABEL: uitofp_4i64_to_4f64:
824 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [4294967295,4294967295]
825 ; SSE2-NEXT: movdqa %xmm0, %xmm3
826 ; SSE2-NEXT: pand %xmm2, %xmm3
827 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
828 ; SSE2-NEXT: por %xmm4, %xmm3
829 ; SSE2-NEXT: psrlq $32, %xmm0
830 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
831 ; SSE2-NEXT: por %xmm5, %xmm0
832 ; SSE2-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
833 ; SSE2-NEXT: subpd %xmm6, %xmm0
834 ; SSE2-NEXT: addpd %xmm3, %xmm0
835 ; SSE2-NEXT: pand %xmm1, %xmm2
836 ; SSE2-NEXT: por %xmm4, %xmm2
837 ; SSE2-NEXT: psrlq $32, %xmm1
838 ; SSE2-NEXT: por %xmm5, %xmm1
839 ; SSE2-NEXT: subpd %xmm6, %xmm1
840 ; SSE2-NEXT: addpd %xmm2, %xmm1
843 ; SSE41-LABEL: uitofp_4i64_to_4f64:
845 ; SSE41-NEXT: pxor %xmm2, %xmm2
846 ; SSE41-NEXT: movdqa %xmm0, %xmm3
847 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3],xmm3[4,5],xmm2[6,7]
848 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
849 ; SSE41-NEXT: por %xmm4, %xmm3
850 ; SSE41-NEXT: psrlq $32, %xmm0
851 ; SSE41-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
852 ; SSE41-NEXT: por %xmm5, %xmm0
853 ; SSE41-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
854 ; SSE41-NEXT: subpd %xmm6, %xmm0
855 ; SSE41-NEXT: addpd %xmm3, %xmm0
856 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
857 ; SSE41-NEXT: por %xmm4, %xmm2
858 ; SSE41-NEXT: psrlq $32, %xmm1
859 ; SSE41-NEXT: por %xmm5, %xmm1
860 ; SSE41-NEXT: subpd %xmm6, %xmm1
861 ; SSE41-NEXT: addpd %xmm2, %xmm1
864 ; AVX1-LABEL: uitofp_4i64_to_4f64:
866 ; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
867 ; AVX1-NEXT: vblendps {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
868 ; AVX1-NEXT: vorps {{.*}}(%rip), %ymm1, %ymm1
869 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm2
870 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
871 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm0
872 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm2, %ymm0
873 ; AVX1-NEXT: vorpd {{.*}}(%rip), %ymm0, %ymm0
874 ; AVX1-NEXT: vsubpd {{.*}}(%rip), %ymm0, %ymm0
875 ; AVX1-NEXT: vaddpd %ymm0, %ymm1, %ymm0
878 ; AVX2-LABEL: uitofp_4i64_to_4f64:
880 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
881 ; AVX2-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
882 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
883 ; AVX2-NEXT: vpor %ymm2, %ymm1, %ymm1
884 ; AVX2-NEXT: vpsrlq $32, %ymm0, %ymm0
885 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
886 ; AVX2-NEXT: vpor %ymm2, %ymm0, %ymm0
887 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
888 ; AVX2-NEXT: vsubpd %ymm2, %ymm0, %ymm0
889 ; AVX2-NEXT: vaddpd %ymm0, %ymm1, %ymm0
892 ; AVX512F-LABEL: uitofp_4i64_to_4f64:
894 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
895 ; AVX512F-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
896 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
897 ; AVX512F-NEXT: vpor %ymm2, %ymm1, %ymm1
898 ; AVX512F-NEXT: vpsrlq $32, %ymm0, %ymm0
899 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
900 ; AVX512F-NEXT: vpor %ymm2, %ymm0, %ymm0
901 ; AVX512F-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
902 ; AVX512F-NEXT: vsubpd %ymm2, %ymm0, %ymm0
903 ; AVX512F-NEXT: vaddpd %ymm0, %ymm1, %ymm0
906 ; AVX512VL-LABEL: uitofp_4i64_to_4f64:
908 ; AVX512VL-NEXT: vpandq {{.*}}(%rip){1to4}, %ymm0, %ymm1
909 ; AVX512VL-NEXT: vporq {{.*}}(%rip){1to4}, %ymm1, %ymm1
910 ; AVX512VL-NEXT: vpsrlq $32, %ymm0, %ymm0
911 ; AVX512VL-NEXT: vporq {{.*}}(%rip){1to4}, %ymm0, %ymm0
912 ; AVX512VL-NEXT: vsubpd {{.*}}(%rip){1to4}, %ymm0, %ymm0
913 ; AVX512VL-NEXT: vaddpd %ymm0, %ymm1, %ymm0
914 ; AVX512VL-NEXT: retq
916 ; AVX512DQ-LABEL: uitofp_4i64_to_4f64:
918 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
919 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
920 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
921 ; AVX512DQ-NEXT: retq
923 ; AVX512VLDQ-LABEL: uitofp_4i64_to_4f64:
924 ; AVX512VLDQ: # %bb.0:
925 ; AVX512VLDQ-NEXT: vcvtuqq2pd %ymm0, %ymm0
926 ; AVX512VLDQ-NEXT: retq
927 %cvt = uitofp <4 x i64> %a to <4 x double>
928 ret <4 x double> %cvt
931 define <4 x double> @uitofp_4i32_to_4f64(<4 x i32> %a) {
932 ; SSE2-LABEL: uitofp_4i32_to_4f64:
934 ; SSE2-NEXT: movdqa %xmm0, %xmm1
935 ; SSE2-NEXT: psrld $16, %xmm1
936 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
937 ; SSE2-NEXT: movapd {{.*#+}} xmm2 = [6.5536E+4,6.5536E+4]
938 ; SSE2-NEXT: mulpd %xmm2, %xmm1
939 ; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [65535,0,65535,0,0,0,0,0]
940 ; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm0[2,3,0,1]
941 ; SSE2-NEXT: pand %xmm3, %xmm0
942 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
943 ; SSE2-NEXT: addpd %xmm1, %xmm0
944 ; SSE2-NEXT: movdqa %xmm4, %xmm1
945 ; SSE2-NEXT: psrld $16, %xmm1
946 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm5
947 ; SSE2-NEXT: mulpd %xmm2, %xmm5
948 ; SSE2-NEXT: pand %xmm3, %xmm4
949 ; SSE2-NEXT: cvtdq2pd %xmm4, %xmm1
950 ; SSE2-NEXT: addpd %xmm5, %xmm1
953 ; SSE41-LABEL: uitofp_4i32_to_4f64:
955 ; SSE41-NEXT: movdqa %xmm0, %xmm1
956 ; SSE41-NEXT: psrld $16, %xmm1
957 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
958 ; SSE41-NEXT: movapd {{.*#+}} xmm2 = [6.5536E+4,6.5536E+4]
959 ; SSE41-NEXT: mulpd %xmm2, %xmm1
960 ; SSE41-NEXT: pxor %xmm3, %xmm3
961 ; SSE41-NEXT: pshufd {{.*#+}} xmm4 = xmm0[2,3,0,1]
962 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm3[1],xmm0[2],xmm3[3],xmm0[4,5,6,7]
963 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
964 ; SSE41-NEXT: addpd %xmm1, %xmm0
965 ; SSE41-NEXT: movdqa %xmm4, %xmm1
966 ; SSE41-NEXT: psrld $16, %xmm1
967 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm5
968 ; SSE41-NEXT: mulpd %xmm2, %xmm5
969 ; SSE41-NEXT: pblendw {{.*#+}} xmm4 = xmm4[0],xmm3[1],xmm4[2],xmm3[3],xmm4[4,5,6,7]
970 ; SSE41-NEXT: cvtdq2pd %xmm4, %xmm1
971 ; SSE41-NEXT: addpd %xmm5, %xmm1
974 ; AVX1-LABEL: uitofp_4i32_to_4f64:
976 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
977 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
978 ; AVX1-NEXT: vcvtdq2pd %xmm1, %ymm1
979 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
980 ; AVX1-NEXT: vcvtdq2pd %xmm0, %ymm0
981 ; AVX1-NEXT: vmulpd {{.*}}(%rip), %ymm0, %ymm0
982 ; AVX1-NEXT: vaddpd %ymm1, %ymm0, %ymm0
985 ; AVX2-LABEL: uitofp_4i32_to_4f64:
987 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm1
988 ; AVX2-NEXT: vcvtdq2pd %xmm1, %ymm1
989 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm2 = [6.5536E+4,6.5536E+4,6.5536E+4,6.5536E+4]
990 ; AVX2-NEXT: vmulpd %ymm2, %ymm1, %ymm1
991 ; AVX2-NEXT: vxorpd %xmm2, %xmm2, %xmm2
992 ; AVX2-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
993 ; AVX2-NEXT: vcvtdq2pd %xmm0, %ymm0
994 ; AVX2-NEXT: vaddpd %ymm0, %ymm1, %ymm0
997 ; AVX512F-LABEL: uitofp_4i32_to_4f64:
999 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1000 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
1001 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1002 ; AVX512F-NEXT: retq
1004 ; AVX512VL-LABEL: uitofp_4i32_to_4f64:
1005 ; AVX512VL: # %bb.0:
1006 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %ymm0
1007 ; AVX512VL-NEXT: retq
1009 ; AVX512DQ-LABEL: uitofp_4i32_to_4f64:
1010 ; AVX512DQ: # %bb.0:
1011 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1012 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
1013 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1014 ; AVX512DQ-NEXT: retq
1016 ; AVX512VLDQ-LABEL: uitofp_4i32_to_4f64:
1017 ; AVX512VLDQ: # %bb.0:
1018 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %ymm0
1019 ; AVX512VLDQ-NEXT: retq
1020 %cvt = uitofp <4 x i32> %a to <4 x double>
1021 ret <4 x double> %cvt
1024 define <4 x double> @uitofp_4i16_to_4f64(<8 x i16> %a) {
1025 ; SSE2-LABEL: uitofp_4i16_to_4f64:
1027 ; SSE2-NEXT: pxor %xmm1, %xmm1
1028 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1029 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1030 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1031 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1032 ; SSE2-NEXT: movaps %xmm2, %xmm0
1035 ; SSE41-LABEL: uitofp_4i16_to_4f64:
1037 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1038 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1039 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
1040 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1043 ; AVX-LABEL: uitofp_4i16_to_4f64:
1045 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1046 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
1048 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1049 %cvt = uitofp <4 x i16> %shuf to <4 x double>
1050 ret <4 x double> %cvt
1053 define <4 x double> @uitofp_8i16_to_4f64(<8 x i16> %a) {
1054 ; SSE2-LABEL: uitofp_8i16_to_4f64:
1056 ; SSE2-NEXT: pxor %xmm1, %xmm1
1057 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1058 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1059 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1060 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1061 ; SSE2-NEXT: movaps %xmm2, %xmm0
1064 ; SSE41-LABEL: uitofp_8i16_to_4f64:
1066 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1067 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1068 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
1069 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1072 ; VEX-LABEL: uitofp_8i16_to_4f64:
1074 ; VEX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1075 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
1078 ; AVX512-LABEL: uitofp_8i16_to_4f64:
1080 ; AVX512-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
1081 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
1082 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1084 %cvt = uitofp <8 x i16> %a to <8 x double>
1085 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1086 ret <4 x double> %shuf
1089 define <4 x double> @uitofp_4i8_to_4f64(<16 x i8> %a) {
1090 ; SSE2-LABEL: uitofp_4i8_to_4f64:
1092 ; SSE2-NEXT: pxor %xmm1, %xmm1
1093 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
1094 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1095 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1096 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1097 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1098 ; SSE2-NEXT: movaps %xmm2, %xmm0
1101 ; SSE41-LABEL: uitofp_4i8_to_4f64:
1103 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1104 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1105 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
1106 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1109 ; AVX-LABEL: uitofp_4i8_to_4f64:
1111 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1112 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
1114 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1115 %cvt = uitofp <4 x i8> %shuf to <4 x double>
1116 ret <4 x double> %cvt
1119 define <4 x double> @uitofp_16i8_to_4f64(<16 x i8> %a) {
1120 ; SSE2-LABEL: uitofp_16i8_to_4f64:
1122 ; SSE2-NEXT: pxor %xmm1, %xmm1
1123 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
1124 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1125 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1126 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1127 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1128 ; SSE2-NEXT: movaps %xmm2, %xmm0
1131 ; SSE41-LABEL: uitofp_16i8_to_4f64:
1133 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1134 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1135 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
1136 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1139 ; VEX-LABEL: uitofp_16i8_to_4f64:
1141 ; VEX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1142 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
1145 ; AVX512-LABEL: uitofp_16i8_to_4f64:
1147 ; AVX512-NEXT: vpmovzxbd {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero,xmm0[8],zero,zero,zero,xmm0[9],zero,zero,zero,xmm0[10],zero,zero,zero,xmm0[11],zero,zero,zero,xmm0[12],zero,zero,zero,xmm0[13],zero,zero,zero,xmm0[14],zero,zero,zero,xmm0[15],zero,zero,zero
1148 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
1149 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1151 %cvt = uitofp <16 x i8> %a to <16 x double>
1152 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1153 ret <4 x double> %shuf
1157 ; Signed Integer to Float
1160 define <4 x float> @sitofp_2i64_to_4f32(<2 x i64> %a) {
1161 ; SSE2-LABEL: sitofp_2i64_to_4f32:
1163 ; SSE2-NEXT: movq %xmm0, %rax
1164 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1165 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1166 ; SSE2-NEXT: movq %xmm0, %rax
1167 ; SSE2-NEXT: xorps %xmm0, %xmm0
1168 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1169 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1170 ; SSE2-NEXT: movaps %xmm1, %xmm0
1173 ; SSE41-LABEL: sitofp_2i64_to_4f32:
1175 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1176 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1177 ; SSE41-NEXT: movq %xmm0, %rax
1178 ; SSE41-NEXT: xorps %xmm0, %xmm0
1179 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1180 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
1183 ; VEX-LABEL: sitofp_2i64_to_4f32:
1185 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1186 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1187 ; VEX-NEXT: vmovq %xmm0, %rax
1188 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1189 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1192 ; AVX512F-LABEL: sitofp_2i64_to_4f32:
1194 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1195 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1196 ; AVX512F-NEXT: vmovq %xmm0, %rax
1197 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1198 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1199 ; AVX512F-NEXT: retq
1201 ; AVX512VL-LABEL: sitofp_2i64_to_4f32:
1202 ; AVX512VL: # %bb.0:
1203 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1204 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1205 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1206 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1207 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1208 ; AVX512VL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1209 ; AVX512VL-NEXT: retq
1211 ; AVX512DQ-LABEL: sitofp_2i64_to_4f32:
1212 ; AVX512DQ: # %bb.0:
1213 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1214 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1215 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1216 ; AVX512DQ-NEXT: vzeroupper
1217 ; AVX512DQ-NEXT: retq
1219 ; AVX512VLDQ-LABEL: sitofp_2i64_to_4f32:
1220 ; AVX512VLDQ: # %bb.0:
1221 ; AVX512VLDQ-NEXT: vcvtqq2ps %xmm0, %xmm0
1222 ; AVX512VLDQ-NEXT: retq
1223 %cvt = sitofp <2 x i64> %a to <2 x float>
1224 %ext = shufflevector <2 x float> %cvt, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1225 ret <4 x float> %ext
1228 define <4 x float> @sitofp_2i64_to_4f32_zero(<2 x i64> %a) {
1229 ; SSE2-LABEL: sitofp_2i64_to_4f32_zero:
1231 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
1232 ; SSE2-NEXT: movq %xmm1, %rax
1233 ; SSE2-NEXT: xorps %xmm1, %xmm1
1234 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1235 ; SSE2-NEXT: movq %xmm0, %rax
1236 ; SSE2-NEXT: xorps %xmm0, %xmm0
1237 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1238 ; SSE2-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1239 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
1242 ; SSE41-LABEL: sitofp_2i64_to_4f32_zero:
1244 ; SSE41-NEXT: movq %xmm0, %rax
1245 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1246 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1247 ; SSE41-NEXT: xorps %xmm0, %xmm0
1248 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1249 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0],xmm0[0],zero,zero
1250 ; SSE41-NEXT: movaps %xmm1, %xmm0
1253 ; VEX-LABEL: sitofp_2i64_to_4f32_zero:
1255 ; VEX-NEXT: vmovq %xmm0, %rax
1256 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1257 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1258 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1259 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
1262 ; AVX512F-LABEL: sitofp_2i64_to_4f32_zero:
1264 ; AVX512F-NEXT: vmovq %xmm0, %rax
1265 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1266 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1267 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1268 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
1269 ; AVX512F-NEXT: retq
1271 ; AVX512VL-LABEL: sitofp_2i64_to_4f32_zero:
1272 ; AVX512VL: # %bb.0:
1273 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1274 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1275 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1276 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1277 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1278 ; AVX512VL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1279 ; AVX512VL-NEXT: retq
1281 ; AVX512DQ-LABEL: sitofp_2i64_to_4f32_zero:
1282 ; AVX512DQ: # %bb.0:
1283 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1284 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1285 ; AVX512DQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1286 ; AVX512DQ-NEXT: vzeroupper
1287 ; AVX512DQ-NEXT: retq
1289 ; AVX512VLDQ-LABEL: sitofp_2i64_to_4f32_zero:
1290 ; AVX512VLDQ: # %bb.0:
1291 ; AVX512VLDQ-NEXT: vcvtqq2ps %xmm0, %xmm0
1292 ; AVX512VLDQ-NEXT: retq
1293 %cvt = sitofp <2 x i64> %a to <2 x float>
1294 %ext = shufflevector <2 x float> %cvt, <2 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1295 ret <4 x float> %ext
1298 define <4 x float> @sitofp_4i64_to_4f32_undef(<2 x i64> %a) {
1299 ; SSE2-LABEL: sitofp_4i64_to_4f32_undef:
1301 ; SSE2-NEXT: movq %xmm0, %rax
1302 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1303 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1304 ; SSE2-NEXT: movq %xmm0, %rax
1305 ; SSE2-NEXT: xorps %xmm0, %xmm0
1306 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1307 ; SSE2-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1308 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm1[0],zero
1311 ; SSE41-LABEL: sitofp_4i64_to_4f32_undef:
1313 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1314 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1315 ; SSE41-NEXT: movq %xmm0, %rax
1316 ; SSE41-NEXT: xorps %xmm0, %xmm0
1317 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1318 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1321 ; VEX-LABEL: sitofp_4i64_to_4f32_undef:
1323 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1324 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1325 ; VEX-NEXT: vmovq %xmm0, %rax
1326 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1327 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1330 ; AVX512F-LABEL: sitofp_4i64_to_4f32_undef:
1332 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1333 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1334 ; AVX512F-NEXT: vmovq %xmm0, %rax
1335 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1336 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1337 ; AVX512F-NEXT: retq
1339 ; AVX512VL-LABEL: sitofp_4i64_to_4f32_undef:
1340 ; AVX512VL: # %bb.0:
1341 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1342 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1343 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1344 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1345 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1346 ; AVX512VL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1347 ; AVX512VL-NEXT: retq
1349 ; AVX512DQ-LABEL: sitofp_4i64_to_4f32_undef:
1350 ; AVX512DQ: # %bb.0:
1351 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1352 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1353 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1354 ; AVX512DQ-NEXT: vzeroupper
1355 ; AVX512DQ-NEXT: retq
1357 ; AVX512VLDQ-LABEL: sitofp_4i64_to_4f32_undef:
1358 ; AVX512VLDQ: # %bb.0:
1359 ; AVX512VLDQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1360 ; AVX512VLDQ-NEXT: vcvtqq2ps %ymm0, %xmm0
1361 ; AVX512VLDQ-NEXT: vzeroupper
1362 ; AVX512VLDQ-NEXT: retq
1363 %ext = shufflevector <2 x i64> %a, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1364 %cvt = sitofp <4 x i64> %ext to <4 x float>
1365 ret <4 x float> %cvt
1368 define <4 x float> @sitofp_4i32_to_4f32(<4 x i32> %a) {
1369 ; SSE-LABEL: sitofp_4i32_to_4f32:
1371 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
1374 ; AVX-LABEL: sitofp_4i32_to_4f32:
1376 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
1378 %cvt = sitofp <4 x i32> %a to <4 x float>
1379 ret <4 x float> %cvt
1382 define <4 x float> @sitofp_4i16_to_4f32(<8 x i16> %a) {
1383 ; SSE2-LABEL: sitofp_4i16_to_4f32:
1385 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1386 ; SSE2-NEXT: psrad $16, %xmm0
1387 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1390 ; SSE41-LABEL: sitofp_4i16_to_4f32:
1392 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
1393 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1396 ; AVX-LABEL: sitofp_4i16_to_4f32:
1398 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
1399 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
1401 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1402 %cvt = sitofp <4 x i16> %shuf to <4 x float>
1403 ret <4 x float> %cvt
1406 define <4 x float> @sitofp_8i16_to_4f32(<8 x i16> %a) {
1407 ; SSE2-LABEL: sitofp_8i16_to_4f32:
1409 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1410 ; SSE2-NEXT: psrad $16, %xmm0
1411 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1414 ; SSE41-LABEL: sitofp_8i16_to_4f32:
1416 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
1417 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1420 ; AVX1-LABEL: sitofp_8i16_to_4f32:
1422 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm1
1423 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1424 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm0
1425 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1426 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1427 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1428 ; AVX1-NEXT: vzeroupper
1431 ; AVX2-LABEL: sitofp_8i16_to_4f32:
1433 ; AVX2-NEXT: vpmovsxwd %xmm0, %ymm0
1434 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1435 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1436 ; AVX2-NEXT: vzeroupper
1439 ; AVX512-LABEL: sitofp_8i16_to_4f32:
1441 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
1442 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
1443 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1444 ; AVX512-NEXT: vzeroupper
1446 %cvt = sitofp <8 x i16> %a to <8 x float>
1447 %shuf = shufflevector <8 x float> %cvt, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1448 ret <4 x float> %shuf
1451 define <4 x float> @sitofp_4i8_to_4f32(<16 x i8> %a) {
1452 ; SSE2-LABEL: sitofp_4i8_to_4f32:
1454 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
1455 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1456 ; SSE2-NEXT: psrad $24, %xmm0
1457 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1460 ; SSE41-LABEL: sitofp_4i8_to_4f32:
1462 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1463 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1466 ; AVX-LABEL: sitofp_4i8_to_4f32:
1468 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
1469 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
1471 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1472 %cvt = sitofp <4 x i8> %shuf to <4 x float>
1473 ret <4 x float> %cvt
1476 define <4 x float> @sitofp_16i8_to_4f32(<16 x i8> %a) {
1477 ; SSE2-LABEL: sitofp_16i8_to_4f32:
1479 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
1480 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1481 ; SSE2-NEXT: psrad $24, %xmm0
1482 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1485 ; SSE41-LABEL: sitofp_16i8_to_4f32:
1487 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1488 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1491 ; AVX1-LABEL: sitofp_16i8_to_4f32:
1493 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm1
1494 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
1495 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm0
1496 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1497 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1498 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1499 ; AVX1-NEXT: vzeroupper
1502 ; AVX2-LABEL: sitofp_16i8_to_4f32:
1504 ; AVX2-NEXT: vpmovsxbd %xmm0, %ymm0
1505 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1506 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1507 ; AVX2-NEXT: vzeroupper
1510 ; AVX512-LABEL: sitofp_16i8_to_4f32:
1512 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
1513 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
1514 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1515 ; AVX512-NEXT: vzeroupper
1517 %cvt = sitofp <16 x i8> %a to <16 x float>
1518 %shuf = shufflevector <16 x float> %cvt, <16 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1519 ret <4 x float> %shuf
1522 define <4 x float> @sitofp_4i64_to_4f32(<4 x i64> %a) {
1523 ; SSE2-LABEL: sitofp_4i64_to_4f32:
1525 ; SSE2-NEXT: movq %xmm1, %rax
1526 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
1527 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
1528 ; SSE2-NEXT: movq %xmm1, %rax
1529 ; SSE2-NEXT: xorps %xmm1, %xmm1
1530 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1531 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
1532 ; SSE2-NEXT: movq %xmm0, %rax
1533 ; SSE2-NEXT: xorps %xmm1, %xmm1
1534 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1535 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1536 ; SSE2-NEXT: movq %xmm0, %rax
1537 ; SSE2-NEXT: xorps %xmm0, %xmm0
1538 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1539 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1540 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
1541 ; SSE2-NEXT: movaps %xmm1, %xmm0
1544 ; SSE41-LABEL: sitofp_4i64_to_4f32:
1546 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1547 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
1548 ; SSE41-NEXT: movq %xmm0, %rax
1549 ; SSE41-NEXT: xorps %xmm0, %xmm0
1550 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1551 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
1552 ; SSE41-NEXT: movq %xmm1, %rax
1553 ; SSE41-NEXT: xorps %xmm2, %xmm2
1554 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
1555 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
1556 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
1557 ; SSE41-NEXT: xorps %xmm1, %xmm1
1558 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1559 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
1562 ; AVX1-LABEL: sitofp_4i64_to_4f32:
1564 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
1565 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1566 ; AVX1-NEXT: vmovq %xmm0, %rax
1567 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1568 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1569 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1570 ; AVX1-NEXT: vmovq %xmm0, %rax
1571 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1572 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1573 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
1574 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1575 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1576 ; AVX1-NEXT: vzeroupper
1579 ; AVX2-LABEL: sitofp_4i64_to_4f32:
1581 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
1582 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1583 ; AVX2-NEXT: vmovq %xmm0, %rax
1584 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1585 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1586 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm0
1587 ; AVX2-NEXT: vmovq %xmm0, %rax
1588 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1589 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1590 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
1591 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1592 ; AVX2-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1593 ; AVX2-NEXT: vzeroupper
1596 ; AVX512F-LABEL: sitofp_4i64_to_4f32:
1598 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1599 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1600 ; AVX512F-NEXT: vmovq %xmm0, %rax
1601 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1602 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1603 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm0
1604 ; AVX512F-NEXT: vmovq %xmm0, %rax
1605 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1606 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1607 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1608 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1609 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1610 ; AVX512F-NEXT: vzeroupper
1611 ; AVX512F-NEXT: retq
1613 ; AVX512VL-LABEL: sitofp_4i64_to_4f32:
1614 ; AVX512VL: # %bb.0:
1615 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1616 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1617 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1618 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1619 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1620 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm0
1621 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1622 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1623 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1624 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1625 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1626 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1627 ; AVX512VL-NEXT: vzeroupper
1628 ; AVX512VL-NEXT: retq
1630 ; AVX512DQ-LABEL: sitofp_4i64_to_4f32:
1631 ; AVX512DQ: # %bb.0:
1632 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1633 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1634 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1635 ; AVX512DQ-NEXT: vzeroupper
1636 ; AVX512DQ-NEXT: retq
1638 ; AVX512VLDQ-LABEL: sitofp_4i64_to_4f32:
1639 ; AVX512VLDQ: # %bb.0:
1640 ; AVX512VLDQ-NEXT: vcvtqq2ps %ymm0, %xmm0
1641 ; AVX512VLDQ-NEXT: vzeroupper
1642 ; AVX512VLDQ-NEXT: retq
1643 %cvt = sitofp <4 x i64> %a to <4 x float>
1644 ret <4 x float> %cvt
1647 define <8 x float> @sitofp_8i32_to_8f32(<8 x i32> %a) {
1648 ; SSE-LABEL: sitofp_8i32_to_8f32:
1650 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
1651 ; SSE-NEXT: cvtdq2ps %xmm1, %xmm1
1654 ; AVX-LABEL: sitofp_8i32_to_8f32:
1656 ; AVX-NEXT: vcvtdq2ps %ymm0, %ymm0
1658 %cvt = sitofp <8 x i32> %a to <8 x float>
1659 ret <8 x float> %cvt
1662 define <8 x float> @sitofp_8i16_to_8f32(<8 x i16> %a) {
1663 ; SSE2-LABEL: sitofp_8i16_to_8f32:
1665 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
1666 ; SSE2-NEXT: psrad $16, %xmm1
1667 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm2
1668 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4,4,5,5,6,6,7,7]
1669 ; SSE2-NEXT: psrad $16, %xmm0
1670 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
1671 ; SSE2-NEXT: movaps %xmm2, %xmm0
1674 ; SSE41-LABEL: sitofp_8i16_to_8f32:
1676 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm1
1677 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
1678 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1679 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
1680 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
1681 ; SSE41-NEXT: movaps %xmm2, %xmm0
1684 ; AVX1-LABEL: sitofp_8i16_to_8f32:
1686 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm1
1687 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
1688 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm0
1689 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1690 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1693 ; AVX2-LABEL: sitofp_8i16_to_8f32:
1695 ; AVX2-NEXT: vpmovsxwd %xmm0, %ymm0
1696 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1699 ; AVX512-LABEL: sitofp_8i16_to_8f32:
1701 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
1702 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
1704 %cvt = sitofp <8 x i16> %a to <8 x float>
1705 ret <8 x float> %cvt
1708 define <8 x float> @sitofp_8i8_to_8f32(<16 x i8> %a) {
1709 ; SSE2-LABEL: sitofp_8i8_to_8f32:
1711 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
1712 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
1713 ; SSE2-NEXT: psrad $24, %xmm1
1714 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm2
1715 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4,4,5,5,6,6,7,7]
1716 ; SSE2-NEXT: psrad $24, %xmm0
1717 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
1718 ; SSE2-NEXT: movaps %xmm2, %xmm0
1721 ; SSE41-LABEL: sitofp_8i8_to_8f32:
1723 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
1724 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
1725 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
1726 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1727 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
1728 ; SSE41-NEXT: movaps %xmm2, %xmm0
1731 ; AVX1-LABEL: sitofp_8i8_to_8f32:
1733 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm1
1734 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
1735 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm0
1736 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1737 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1740 ; AVX2-LABEL: sitofp_8i8_to_8f32:
1742 ; AVX2-NEXT: vpmovsxbd %xmm0, %ymm0
1743 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1746 ; AVX512-LABEL: sitofp_8i8_to_8f32:
1748 ; AVX512-NEXT: vpmovsxbd %xmm0, %ymm0
1749 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
1751 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1752 %cvt = sitofp <8 x i8> %shuf to <8 x float>
1753 ret <8 x float> %cvt
1756 define <8 x float> @sitofp_16i8_to_8f32(<16 x i8> %a) {
1757 ; SSE2-LABEL: sitofp_16i8_to_8f32:
1759 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
1760 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
1761 ; SSE2-NEXT: psrad $24, %xmm1
1762 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm2
1763 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4,4,5,5,6,6,7,7]
1764 ; SSE2-NEXT: psrad $24, %xmm0
1765 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
1766 ; SSE2-NEXT: movaps %xmm2, %xmm0
1769 ; SSE41-LABEL: sitofp_16i8_to_8f32:
1771 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
1772 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
1773 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
1774 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1775 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
1776 ; SSE41-NEXT: movaps %xmm2, %xmm0
1779 ; AVX1-LABEL: sitofp_16i8_to_8f32:
1781 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm1
1782 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
1783 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm0
1784 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1785 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1788 ; AVX2-LABEL: sitofp_16i8_to_8f32:
1790 ; AVX2-NEXT: vpmovsxbd %xmm0, %ymm0
1791 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1794 ; AVX512-LABEL: sitofp_16i8_to_8f32:
1796 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
1797 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
1798 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1800 %cvt = sitofp <16 x i8> %a to <16 x float>
1801 %shuf = shufflevector <16 x float> %cvt, <16 x float> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1802 ret <8 x float> %shuf
1806 ; Unsigned Integer to Float
1809 define <4 x float> @uitofp_2i64_to_4f32(<2 x i64> %a) {
1810 ; SSE2-LABEL: uitofp_2i64_to_4f32:
1812 ; SSE2-NEXT: movdqa %xmm0, %xmm1
1813 ; SSE2-NEXT: movq %xmm0, %rax
1814 ; SSE2-NEXT: testq %rax, %rax
1815 ; SSE2-NEXT: js .LBB39_1
1816 ; SSE2-NEXT: # %bb.2:
1817 ; SSE2-NEXT: xorps %xmm0, %xmm0
1818 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1819 ; SSE2-NEXT: jmp .LBB39_3
1820 ; SSE2-NEXT: .LBB39_1:
1821 ; SSE2-NEXT: movq %rax, %rcx
1822 ; SSE2-NEXT: shrq %rcx
1823 ; SSE2-NEXT: andl $1, %eax
1824 ; SSE2-NEXT: orq %rcx, %rax
1825 ; SSE2-NEXT: xorps %xmm0, %xmm0
1826 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1827 ; SSE2-NEXT: addss %xmm0, %xmm0
1828 ; SSE2-NEXT: .LBB39_3:
1829 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
1830 ; SSE2-NEXT: movq %xmm1, %rax
1831 ; SSE2-NEXT: testq %rax, %rax
1832 ; SSE2-NEXT: js .LBB39_4
1833 ; SSE2-NEXT: # %bb.5:
1834 ; SSE2-NEXT: xorps %xmm1, %xmm1
1835 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1836 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1838 ; SSE2-NEXT: .LBB39_4:
1839 ; SSE2-NEXT: movq %rax, %rcx
1840 ; SSE2-NEXT: shrq %rcx
1841 ; SSE2-NEXT: andl $1, %eax
1842 ; SSE2-NEXT: orq %rcx, %rax
1843 ; SSE2-NEXT: xorps %xmm1, %xmm1
1844 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1845 ; SSE2-NEXT: addss %xmm1, %xmm1
1846 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1849 ; SSE41-LABEL: uitofp_2i64_to_4f32:
1851 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1852 ; SSE41-NEXT: testq %rax, %rax
1853 ; SSE41-NEXT: js .LBB39_1
1854 ; SSE41-NEXT: # %bb.2:
1855 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1856 ; SSE41-NEXT: jmp .LBB39_3
1857 ; SSE41-NEXT: .LBB39_1:
1858 ; SSE41-NEXT: movq %rax, %rcx
1859 ; SSE41-NEXT: shrq %rcx
1860 ; SSE41-NEXT: andl $1, %eax
1861 ; SSE41-NEXT: orq %rcx, %rax
1862 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1863 ; SSE41-NEXT: addss %xmm1, %xmm1
1864 ; SSE41-NEXT: .LBB39_3:
1865 ; SSE41-NEXT: movq %xmm0, %rax
1866 ; SSE41-NEXT: testq %rax, %rax
1867 ; SSE41-NEXT: js .LBB39_4
1868 ; SSE41-NEXT: # %bb.5:
1869 ; SSE41-NEXT: xorps %xmm0, %xmm0
1870 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1871 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
1873 ; SSE41-NEXT: .LBB39_4:
1874 ; SSE41-NEXT: movq %rax, %rcx
1875 ; SSE41-NEXT: shrq %rcx
1876 ; SSE41-NEXT: andl $1, %eax
1877 ; SSE41-NEXT: orq %rcx, %rax
1878 ; SSE41-NEXT: xorps %xmm0, %xmm0
1879 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1880 ; SSE41-NEXT: addss %xmm0, %xmm0
1881 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
1884 ; VEX-LABEL: uitofp_2i64_to_4f32:
1886 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1887 ; VEX-NEXT: testq %rax, %rax
1888 ; VEX-NEXT: js .LBB39_1
1889 ; VEX-NEXT: # %bb.2:
1890 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1891 ; VEX-NEXT: jmp .LBB39_3
1892 ; VEX-NEXT: .LBB39_1:
1893 ; VEX-NEXT: movq %rax, %rcx
1894 ; VEX-NEXT: shrq %rcx
1895 ; VEX-NEXT: andl $1, %eax
1896 ; VEX-NEXT: orq %rcx, %rax
1897 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1898 ; VEX-NEXT: vaddss %xmm1, %xmm1, %xmm1
1899 ; VEX-NEXT: .LBB39_3:
1900 ; VEX-NEXT: vmovq %xmm0, %rax
1901 ; VEX-NEXT: testq %rax, %rax
1902 ; VEX-NEXT: js .LBB39_4
1903 ; VEX-NEXT: # %bb.5:
1904 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1905 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1907 ; VEX-NEXT: .LBB39_4:
1908 ; VEX-NEXT: movq %rax, %rcx
1909 ; VEX-NEXT: shrq %rcx
1910 ; VEX-NEXT: andl $1, %eax
1911 ; VEX-NEXT: orq %rcx, %rax
1912 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1913 ; VEX-NEXT: vaddss %xmm0, %xmm0, %xmm0
1914 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1917 ; AVX512F-LABEL: uitofp_2i64_to_4f32:
1919 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1920 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
1921 ; AVX512F-NEXT: vmovq %xmm0, %rax
1922 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
1923 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1924 ; AVX512F-NEXT: retq
1926 ; AVX512VL-LABEL: uitofp_2i64_to_4f32:
1927 ; AVX512VL: # %bb.0:
1928 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1929 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
1930 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1931 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
1932 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1933 ; AVX512VL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1934 ; AVX512VL-NEXT: retq
1936 ; AVX512DQ-LABEL: uitofp_2i64_to_4f32:
1937 ; AVX512DQ: # %bb.0:
1938 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1939 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
1940 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1941 ; AVX512DQ-NEXT: vzeroupper
1942 ; AVX512DQ-NEXT: retq
1944 ; AVX512VLDQ-LABEL: uitofp_2i64_to_4f32:
1945 ; AVX512VLDQ: # %bb.0:
1946 ; AVX512VLDQ-NEXT: vcvtuqq2ps %xmm0, %xmm0
1947 ; AVX512VLDQ-NEXT: retq
1948 %cvt = uitofp <2 x i64> %a to <2 x float>
1949 %ext = shufflevector <2 x float> %cvt, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1950 ret <4 x float> %ext
1953 define <4 x float> @uitofp_2i64_to_2f32(<2 x i64> %a) {
1954 ; SSE2-LABEL: uitofp_2i64_to_2f32:
1956 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
1957 ; SSE2-NEXT: movq %xmm1, %rax
1958 ; SSE2-NEXT: testq %rax, %rax
1959 ; SSE2-NEXT: js .LBB40_1
1960 ; SSE2-NEXT: # %bb.2:
1961 ; SSE2-NEXT: xorps %xmm1, %xmm1
1962 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1963 ; SSE2-NEXT: jmp .LBB40_3
1964 ; SSE2-NEXT: .LBB40_1:
1965 ; SSE2-NEXT: movq %rax, %rcx
1966 ; SSE2-NEXT: shrq %rcx
1967 ; SSE2-NEXT: andl $1, %eax
1968 ; SSE2-NEXT: orq %rcx, %rax
1969 ; SSE2-NEXT: xorps %xmm1, %xmm1
1970 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1971 ; SSE2-NEXT: addss %xmm1, %xmm1
1972 ; SSE2-NEXT: .LBB40_3:
1973 ; SSE2-NEXT: movq %xmm0, %rax
1974 ; SSE2-NEXT: testq %rax, %rax
1975 ; SSE2-NEXT: js .LBB40_4
1976 ; SSE2-NEXT: # %bb.5:
1977 ; SSE2-NEXT: xorps %xmm0, %xmm0
1978 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1979 ; SSE2-NEXT: jmp .LBB40_6
1980 ; SSE2-NEXT: .LBB40_4:
1981 ; SSE2-NEXT: movq %rax, %rcx
1982 ; SSE2-NEXT: shrq %rcx
1983 ; SSE2-NEXT: andl $1, %eax
1984 ; SSE2-NEXT: orq %rcx, %rax
1985 ; SSE2-NEXT: xorps %xmm0, %xmm0
1986 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1987 ; SSE2-NEXT: addss %xmm0, %xmm0
1988 ; SSE2-NEXT: .LBB40_6:
1989 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1990 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
1993 ; SSE41-LABEL: uitofp_2i64_to_2f32:
1995 ; SSE41-NEXT: movdqa %xmm0, %xmm1
1996 ; SSE41-NEXT: movq %xmm0, %rax
1997 ; SSE41-NEXT: testq %rax, %rax
1998 ; SSE41-NEXT: js .LBB40_1
1999 ; SSE41-NEXT: # %bb.2:
2000 ; SSE41-NEXT: xorps %xmm0, %xmm0
2001 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2002 ; SSE41-NEXT: jmp .LBB40_3
2003 ; SSE41-NEXT: .LBB40_1:
2004 ; SSE41-NEXT: movq %rax, %rcx
2005 ; SSE41-NEXT: shrq %rcx
2006 ; SSE41-NEXT: andl $1, %eax
2007 ; SSE41-NEXT: orq %rcx, %rax
2008 ; SSE41-NEXT: xorps %xmm0, %xmm0
2009 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2010 ; SSE41-NEXT: addss %xmm0, %xmm0
2011 ; SSE41-NEXT: .LBB40_3:
2012 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
2013 ; SSE41-NEXT: testq %rax, %rax
2014 ; SSE41-NEXT: js .LBB40_4
2015 ; SSE41-NEXT: # %bb.5:
2016 ; SSE41-NEXT: xorps %xmm1, %xmm1
2017 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
2018 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2020 ; SSE41-NEXT: .LBB40_4:
2021 ; SSE41-NEXT: movq %rax, %rcx
2022 ; SSE41-NEXT: shrq %rcx
2023 ; SSE41-NEXT: andl $1, %eax
2024 ; SSE41-NEXT: orq %rcx, %rax
2025 ; SSE41-NEXT: xorps %xmm1, %xmm1
2026 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
2027 ; SSE41-NEXT: addss %xmm1, %xmm1
2028 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2031 ; VEX-LABEL: uitofp_2i64_to_2f32:
2033 ; VEX-NEXT: vmovq %xmm0, %rax
2034 ; VEX-NEXT: testq %rax, %rax
2035 ; VEX-NEXT: js .LBB40_1
2036 ; VEX-NEXT: # %bb.2:
2037 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2038 ; VEX-NEXT: jmp .LBB40_3
2039 ; VEX-NEXT: .LBB40_1:
2040 ; VEX-NEXT: movq %rax, %rcx
2041 ; VEX-NEXT: shrq %rcx
2042 ; VEX-NEXT: andl $1, %eax
2043 ; VEX-NEXT: orq %rcx, %rax
2044 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2045 ; VEX-NEXT: vaddss %xmm1, %xmm1, %xmm1
2046 ; VEX-NEXT: .LBB40_3:
2047 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
2048 ; VEX-NEXT: testq %rax, %rax
2049 ; VEX-NEXT: js .LBB40_4
2050 ; VEX-NEXT: # %bb.5:
2051 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
2052 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
2054 ; VEX-NEXT: .LBB40_4:
2055 ; VEX-NEXT: movq %rax, %rcx
2056 ; VEX-NEXT: shrq %rcx
2057 ; VEX-NEXT: andl $1, %eax
2058 ; VEX-NEXT: orq %rcx, %rax
2059 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
2060 ; VEX-NEXT: vaddss %xmm0, %xmm0, %xmm0
2061 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
2064 ; AVX512F-LABEL: uitofp_2i64_to_2f32:
2066 ; AVX512F-NEXT: vmovq %xmm0, %rax
2067 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2068 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2069 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2070 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
2071 ; AVX512F-NEXT: retq
2073 ; AVX512VL-LABEL: uitofp_2i64_to_2f32:
2074 ; AVX512VL: # %bb.0:
2075 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2076 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2077 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2078 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2079 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2080 ; AVX512VL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
2081 ; AVX512VL-NEXT: retq
2083 ; AVX512DQ-LABEL: uitofp_2i64_to_2f32:
2084 ; AVX512DQ: # %bb.0:
2085 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2086 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
2087 ; AVX512DQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
2088 ; AVX512DQ-NEXT: vzeroupper
2089 ; AVX512DQ-NEXT: retq
2091 ; AVX512VLDQ-LABEL: uitofp_2i64_to_2f32:
2092 ; AVX512VLDQ: # %bb.0:
2093 ; AVX512VLDQ-NEXT: vcvtuqq2ps %xmm0, %xmm0
2094 ; AVX512VLDQ-NEXT: retq
2095 %cvt = uitofp <2 x i64> %a to <2 x float>
2096 %ext = shufflevector <2 x float> %cvt, <2 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2097 ret <4 x float> %ext
2100 define <4 x float> @uitofp_4i64_to_4f32_undef(<2 x i64> %a) {
2101 ; SSE2-LABEL: uitofp_4i64_to_4f32_undef:
2103 ; SSE2-NEXT: movq %xmm0, %rax
2104 ; SSE2-NEXT: testq %rax, %rax
2105 ; SSE2-NEXT: js .LBB41_1
2106 ; SSE2-NEXT: # %bb.2:
2107 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2108 ; SSE2-NEXT: jmp .LBB41_3
2109 ; SSE2-NEXT: .LBB41_1:
2110 ; SSE2-NEXT: movq %rax, %rcx
2111 ; SSE2-NEXT: shrq %rcx
2112 ; SSE2-NEXT: andl $1, %eax
2113 ; SSE2-NEXT: orq %rcx, %rax
2114 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2115 ; SSE2-NEXT: addss %xmm1, %xmm1
2116 ; SSE2-NEXT: .LBB41_3:
2117 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
2118 ; SSE2-NEXT: movq %xmm0, %rax
2119 ; SSE2-NEXT: testq %rax, %rax
2120 ; SSE2-NEXT: js .LBB41_4
2121 ; SSE2-NEXT: # %bb.5:
2122 ; SSE2-NEXT: xorps %xmm0, %xmm0
2123 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2124 ; SSE2-NEXT: jmp .LBB41_6
2125 ; SSE2-NEXT: .LBB41_4:
2126 ; SSE2-NEXT: movq %rax, %rcx
2127 ; SSE2-NEXT: shrq %rcx
2128 ; SSE2-NEXT: andl $1, %eax
2129 ; SSE2-NEXT: orq %rcx, %rax
2130 ; SSE2-NEXT: xorps %xmm0, %xmm0
2131 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2132 ; SSE2-NEXT: addss %xmm0, %xmm0
2133 ; SSE2-NEXT: .LBB41_6:
2134 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2135 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm1[0],zero
2138 ; SSE41-LABEL: uitofp_4i64_to_4f32_undef:
2140 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
2141 ; SSE41-NEXT: testq %rax, %rax
2142 ; SSE41-NEXT: js .LBB41_1
2143 ; SSE41-NEXT: # %bb.2:
2144 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
2145 ; SSE41-NEXT: jmp .LBB41_3
2146 ; SSE41-NEXT: .LBB41_1:
2147 ; SSE41-NEXT: movq %rax, %rcx
2148 ; SSE41-NEXT: shrq %rcx
2149 ; SSE41-NEXT: andl $1, %eax
2150 ; SSE41-NEXT: orq %rcx, %rax
2151 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
2152 ; SSE41-NEXT: addss %xmm1, %xmm1
2153 ; SSE41-NEXT: .LBB41_3:
2154 ; SSE41-NEXT: movq %xmm0, %rax
2155 ; SSE41-NEXT: testq %rax, %rax
2156 ; SSE41-NEXT: js .LBB41_4
2157 ; SSE41-NEXT: # %bb.5:
2158 ; SSE41-NEXT: xorps %xmm0, %xmm0
2159 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2160 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2162 ; SSE41-NEXT: .LBB41_4:
2163 ; SSE41-NEXT: movq %rax, %rcx
2164 ; SSE41-NEXT: shrq %rcx
2165 ; SSE41-NEXT: andl $1, %eax
2166 ; SSE41-NEXT: orq %rcx, %rax
2167 ; SSE41-NEXT: xorps %xmm0, %xmm0
2168 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2169 ; SSE41-NEXT: addss %xmm0, %xmm0
2170 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2173 ; VEX-LABEL: uitofp_4i64_to_4f32_undef:
2175 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
2176 ; VEX-NEXT: testq %rax, %rax
2177 ; VEX-NEXT: js .LBB41_1
2178 ; VEX-NEXT: # %bb.2:
2179 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2180 ; VEX-NEXT: jmp .LBB41_3
2181 ; VEX-NEXT: .LBB41_1:
2182 ; VEX-NEXT: movq %rax, %rcx
2183 ; VEX-NEXT: shrq %rcx
2184 ; VEX-NEXT: andl $1, %eax
2185 ; VEX-NEXT: orq %rcx, %rax
2186 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2187 ; VEX-NEXT: vaddss %xmm1, %xmm1, %xmm1
2188 ; VEX-NEXT: .LBB41_3:
2189 ; VEX-NEXT: vmovq %xmm0, %rax
2190 ; VEX-NEXT: testq %rax, %rax
2191 ; VEX-NEXT: js .LBB41_4
2192 ; VEX-NEXT: # %bb.5:
2193 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
2194 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2196 ; VEX-NEXT: .LBB41_4:
2197 ; VEX-NEXT: movq %rax, %rcx
2198 ; VEX-NEXT: shrq %rcx
2199 ; VEX-NEXT: andl $1, %eax
2200 ; VEX-NEXT: orq %rcx, %rax
2201 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
2202 ; VEX-NEXT: vaddss %xmm0, %xmm0, %xmm0
2203 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2206 ; AVX512F-LABEL: uitofp_4i64_to_4f32_undef:
2208 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2209 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2210 ; AVX512F-NEXT: vmovq %xmm0, %rax
2211 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2212 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2213 ; AVX512F-NEXT: retq
2215 ; AVX512VL-LABEL: uitofp_4i64_to_4f32_undef:
2216 ; AVX512VL: # %bb.0:
2217 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2218 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2219 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2220 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2221 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2222 ; AVX512VL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
2223 ; AVX512VL-NEXT: retq
2225 ; AVX512DQ-LABEL: uitofp_4i64_to_4f32_undef:
2226 ; AVX512DQ: # %bb.0:
2227 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2228 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
2229 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2230 ; AVX512DQ-NEXT: vzeroupper
2231 ; AVX512DQ-NEXT: retq
2233 ; AVX512VLDQ-LABEL: uitofp_4i64_to_4f32_undef:
2234 ; AVX512VLDQ: # %bb.0:
2235 ; AVX512VLDQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2236 ; AVX512VLDQ-NEXT: vcvtuqq2ps %ymm0, %xmm0
2237 ; AVX512VLDQ-NEXT: vzeroupper
2238 ; AVX512VLDQ-NEXT: retq
2239 %ext = shufflevector <2 x i64> %a, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
2240 %cvt = uitofp <4 x i64> %ext to <4 x float>
2241 ret <4 x float> %cvt
2244 define <4 x float> @uitofp_4i32_to_4f32(<4 x i32> %a) {
2245 ; SSE2-LABEL: uitofp_4i32_to_4f32:
2247 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
2248 ; SSE2-NEXT: pand %xmm0, %xmm1
2249 ; SSE2-NEXT: por {{.*}}(%rip), %xmm1
2250 ; SSE2-NEXT: psrld $16, %xmm0
2251 ; SSE2-NEXT: por {{.*}}(%rip), %xmm0
2252 ; SSE2-NEXT: addps {{.*}}(%rip), %xmm0
2253 ; SSE2-NEXT: addps %xmm1, %xmm0
2256 ; SSE41-LABEL: uitofp_4i32_to_4f32:
2258 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
2259 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
2260 ; SSE41-NEXT: psrld $16, %xmm0
2261 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
2262 ; SSE41-NEXT: addps {{.*}}(%rip), %xmm0
2263 ; SSE41-NEXT: addps %xmm1, %xmm0
2266 ; AVX1-LABEL: uitofp_4i32_to_4f32:
2268 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
2269 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
2270 ; AVX1-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
2271 ; AVX1-NEXT: vaddps {{.*}}(%rip), %xmm0, %xmm0
2272 ; AVX1-NEXT: vaddps %xmm0, %xmm1, %xmm0
2275 ; AVX2-LABEL: uitofp_4i32_to_4f32:
2277 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
2278 ; AVX2-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
2279 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm0
2280 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm2 = [1392508928,1392508928,1392508928,1392508928]
2281 ; AVX2-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
2282 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm2 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
2283 ; AVX2-NEXT: vaddps %xmm2, %xmm0, %xmm0
2284 ; AVX2-NEXT: vaddps %xmm0, %xmm1, %xmm0
2287 ; AVX512F-LABEL: uitofp_4i32_to_4f32:
2289 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2290 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
2291 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2292 ; AVX512F-NEXT: vzeroupper
2293 ; AVX512F-NEXT: retq
2295 ; AVX512VL-LABEL: uitofp_4i32_to_4f32:
2296 ; AVX512VL: # %bb.0:
2297 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
2298 ; AVX512VL-NEXT: retq
2300 ; AVX512DQ-LABEL: uitofp_4i32_to_4f32:
2301 ; AVX512DQ: # %bb.0:
2302 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2303 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
2304 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2305 ; AVX512DQ-NEXT: vzeroupper
2306 ; AVX512DQ-NEXT: retq
2308 ; AVX512VLDQ-LABEL: uitofp_4i32_to_4f32:
2309 ; AVX512VLDQ: # %bb.0:
2310 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
2311 ; AVX512VLDQ-NEXT: retq
2312 %cvt = uitofp <4 x i32> %a to <4 x float>
2313 ret <4 x float> %cvt
2316 define <4 x float> @uitofp_4i16_to_4f32(<8 x i16> %a) {
2317 ; SSE2-LABEL: uitofp_4i16_to_4f32:
2319 ; SSE2-NEXT: pxor %xmm1, %xmm1
2320 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2321 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2324 ; SSE41-LABEL: uitofp_4i16_to_4f32:
2326 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2327 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2330 ; AVX-LABEL: uitofp_4i16_to_4f32:
2332 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2333 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
2335 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2336 %cvt = uitofp <4 x i16> %shuf to <4 x float>
2337 ret <4 x float> %cvt
2340 define <4 x float> @uitofp_8i16_to_4f32(<8 x i16> %a) {
2341 ; SSE2-LABEL: uitofp_8i16_to_4f32:
2343 ; SSE2-NEXT: pxor %xmm1, %xmm1
2344 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2345 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2348 ; SSE41-LABEL: uitofp_8i16_to_4f32:
2350 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2351 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2354 ; AVX1-LABEL: uitofp_8i16_to_4f32:
2356 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
2357 ; AVX1-NEXT: vpunpckhwd {{.*#+}} xmm1 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2358 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2359 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
2360 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2361 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2362 ; AVX1-NEXT: vzeroupper
2365 ; AVX2-LABEL: uitofp_8i16_to_4f32:
2367 ; AVX2-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
2368 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2369 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2370 ; AVX2-NEXT: vzeroupper
2373 ; AVX512-LABEL: uitofp_8i16_to_4f32:
2375 ; AVX512-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
2376 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
2377 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2378 ; AVX512-NEXT: vzeroupper
2380 %cvt = uitofp <8 x i16> %a to <8 x float>
2381 %shuf = shufflevector <8 x float> %cvt, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2382 ret <4 x float> %shuf
2385 define <4 x float> @uitofp_4i8_to_4f32(<16 x i8> %a) {
2386 ; SSE2-LABEL: uitofp_4i8_to_4f32:
2388 ; SSE2-NEXT: pxor %xmm1, %xmm1
2389 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2390 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2391 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2394 ; SSE41-LABEL: uitofp_4i8_to_4f32:
2396 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2397 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2400 ; AVX-LABEL: uitofp_4i8_to_4f32:
2402 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2403 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
2405 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2406 %cvt = uitofp <4 x i8> %shuf to <4 x float>
2407 ret <4 x float> %cvt
2410 define <4 x float> @uitofp_16i8_to_4f32(<16 x i8> %a) {
2411 ; SSE2-LABEL: uitofp_16i8_to_4f32:
2413 ; SSE2-NEXT: pxor %xmm1, %xmm1
2414 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2415 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2416 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2419 ; SSE41-LABEL: uitofp_16i8_to_4f32:
2421 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2422 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2425 ; AVX1-LABEL: uitofp_16i8_to_4f32:
2427 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2428 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
2429 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2430 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2431 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2432 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2433 ; AVX1-NEXT: vzeroupper
2436 ; AVX2-LABEL: uitofp_16i8_to_4f32:
2438 ; AVX2-NEXT: vpmovzxbd {{.*#+}} ymm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
2439 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2440 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2441 ; AVX2-NEXT: vzeroupper
2444 ; AVX512-LABEL: uitofp_16i8_to_4f32:
2446 ; AVX512-NEXT: vpmovzxbd {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero,xmm0[8],zero,zero,zero,xmm0[9],zero,zero,zero,xmm0[10],zero,zero,zero,xmm0[11],zero,zero,zero,xmm0[12],zero,zero,zero,xmm0[13],zero,zero,zero,xmm0[14],zero,zero,zero,xmm0[15],zero,zero,zero
2447 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
2448 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2449 ; AVX512-NEXT: vzeroupper
2451 %cvt = uitofp <16 x i8> %a to <16 x float>
2452 %shuf = shufflevector <16 x float> %cvt, <16 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2453 ret <4 x float> %shuf
2456 define <4 x float> @uitofp_4i64_to_4f32(<4 x i64> %a) {
2457 ; SSE2-LABEL: uitofp_4i64_to_4f32:
2459 ; SSE2-NEXT: movq %xmm1, %rax
2460 ; SSE2-NEXT: testq %rax, %rax
2461 ; SSE2-NEXT: js .LBB47_1
2462 ; SSE2-NEXT: # %bb.2:
2463 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
2464 ; SSE2-NEXT: jmp .LBB47_3
2465 ; SSE2-NEXT: .LBB47_1:
2466 ; SSE2-NEXT: movq %rax, %rcx
2467 ; SSE2-NEXT: shrq %rcx
2468 ; SSE2-NEXT: andl $1, %eax
2469 ; SSE2-NEXT: orq %rcx, %rax
2470 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
2471 ; SSE2-NEXT: addss %xmm2, %xmm2
2472 ; SSE2-NEXT: .LBB47_3:
2473 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
2474 ; SSE2-NEXT: movq %xmm1, %rax
2475 ; SSE2-NEXT: testq %rax, %rax
2476 ; SSE2-NEXT: js .LBB47_4
2477 ; SSE2-NEXT: # %bb.5:
2478 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
2479 ; SSE2-NEXT: jmp .LBB47_6
2480 ; SSE2-NEXT: .LBB47_4:
2481 ; SSE2-NEXT: movq %rax, %rcx
2482 ; SSE2-NEXT: shrq %rcx
2483 ; SSE2-NEXT: andl $1, %eax
2484 ; SSE2-NEXT: orq %rcx, %rax
2485 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
2486 ; SSE2-NEXT: addss %xmm3, %xmm3
2487 ; SSE2-NEXT: .LBB47_6:
2488 ; SSE2-NEXT: movq %xmm0, %rax
2489 ; SSE2-NEXT: testq %rax, %rax
2490 ; SSE2-NEXT: js .LBB47_7
2491 ; SSE2-NEXT: # %bb.8:
2492 ; SSE2-NEXT: xorps %xmm1, %xmm1
2493 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2494 ; SSE2-NEXT: jmp .LBB47_9
2495 ; SSE2-NEXT: .LBB47_7:
2496 ; SSE2-NEXT: movq %rax, %rcx
2497 ; SSE2-NEXT: shrq %rcx
2498 ; SSE2-NEXT: andl $1, %eax
2499 ; SSE2-NEXT: orq %rcx, %rax
2500 ; SSE2-NEXT: xorps %xmm1, %xmm1
2501 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2502 ; SSE2-NEXT: addss %xmm1, %xmm1
2503 ; SSE2-NEXT: .LBB47_9:
2504 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
2505 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
2506 ; SSE2-NEXT: movq %xmm0, %rax
2507 ; SSE2-NEXT: testq %rax, %rax
2508 ; SSE2-NEXT: js .LBB47_10
2509 ; SSE2-NEXT: # %bb.11:
2510 ; SSE2-NEXT: xorps %xmm0, %xmm0
2511 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2512 ; SSE2-NEXT: jmp .LBB47_12
2513 ; SSE2-NEXT: .LBB47_10:
2514 ; SSE2-NEXT: movq %rax, %rcx
2515 ; SSE2-NEXT: shrq %rcx
2516 ; SSE2-NEXT: andl $1, %eax
2517 ; SSE2-NEXT: orq %rcx, %rax
2518 ; SSE2-NEXT: xorps %xmm0, %xmm0
2519 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2520 ; SSE2-NEXT: addss %xmm0, %xmm0
2521 ; SSE2-NEXT: .LBB47_12:
2522 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2523 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
2524 ; SSE2-NEXT: movaps %xmm1, %xmm0
2527 ; SSE41-LABEL: uitofp_4i64_to_4f32:
2529 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
2530 ; SSE41-NEXT: testq %rax, %rax
2531 ; SSE41-NEXT: js .LBB47_1
2532 ; SSE41-NEXT: # %bb.2:
2533 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
2534 ; SSE41-NEXT: jmp .LBB47_3
2535 ; SSE41-NEXT: .LBB47_1:
2536 ; SSE41-NEXT: movq %rax, %rcx
2537 ; SSE41-NEXT: shrq %rcx
2538 ; SSE41-NEXT: andl $1, %eax
2539 ; SSE41-NEXT: orq %rcx, %rax
2540 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
2541 ; SSE41-NEXT: addss %xmm2, %xmm2
2542 ; SSE41-NEXT: .LBB47_3:
2543 ; SSE41-NEXT: movq %xmm0, %rax
2544 ; SSE41-NEXT: testq %rax, %rax
2545 ; SSE41-NEXT: js .LBB47_4
2546 ; SSE41-NEXT: # %bb.5:
2547 ; SSE41-NEXT: xorps %xmm0, %xmm0
2548 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2549 ; SSE41-NEXT: jmp .LBB47_6
2550 ; SSE41-NEXT: .LBB47_4:
2551 ; SSE41-NEXT: movq %rax, %rcx
2552 ; SSE41-NEXT: shrq %rcx
2553 ; SSE41-NEXT: andl $1, %eax
2554 ; SSE41-NEXT: orq %rcx, %rax
2555 ; SSE41-NEXT: xorps %xmm0, %xmm0
2556 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2557 ; SSE41-NEXT: addss %xmm0, %xmm0
2558 ; SSE41-NEXT: .LBB47_6:
2559 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
2560 ; SSE41-NEXT: movq %xmm1, %rax
2561 ; SSE41-NEXT: testq %rax, %rax
2562 ; SSE41-NEXT: js .LBB47_7
2563 ; SSE41-NEXT: # %bb.8:
2564 ; SSE41-NEXT: xorps %xmm2, %xmm2
2565 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
2566 ; SSE41-NEXT: jmp .LBB47_9
2567 ; SSE41-NEXT: .LBB47_7:
2568 ; SSE41-NEXT: movq %rax, %rcx
2569 ; SSE41-NEXT: shrq %rcx
2570 ; SSE41-NEXT: andl $1, %eax
2571 ; SSE41-NEXT: orq %rcx, %rax
2572 ; SSE41-NEXT: xorps %xmm2, %xmm2
2573 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
2574 ; SSE41-NEXT: addss %xmm2, %xmm2
2575 ; SSE41-NEXT: .LBB47_9:
2576 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
2577 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
2578 ; SSE41-NEXT: testq %rax, %rax
2579 ; SSE41-NEXT: js .LBB47_10
2580 ; SSE41-NEXT: # %bb.11:
2581 ; SSE41-NEXT: xorps %xmm1, %xmm1
2582 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
2583 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
2585 ; SSE41-NEXT: .LBB47_10:
2586 ; SSE41-NEXT: movq %rax, %rcx
2587 ; SSE41-NEXT: shrq %rcx
2588 ; SSE41-NEXT: andl $1, %eax
2589 ; SSE41-NEXT: orq %rcx, %rax
2590 ; SSE41-NEXT: xorps %xmm1, %xmm1
2591 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
2592 ; SSE41-NEXT: addss %xmm1, %xmm1
2593 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
2596 ; AVX1-LABEL: uitofp_4i64_to_4f32:
2598 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
2599 ; AVX1-NEXT: testq %rax, %rax
2600 ; AVX1-NEXT: js .LBB47_1
2601 ; AVX1-NEXT: # %bb.2:
2602 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2603 ; AVX1-NEXT: jmp .LBB47_3
2604 ; AVX1-NEXT: .LBB47_1:
2605 ; AVX1-NEXT: movq %rax, %rcx
2606 ; AVX1-NEXT: shrq %rcx
2607 ; AVX1-NEXT: andl $1, %eax
2608 ; AVX1-NEXT: orq %rcx, %rax
2609 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2610 ; AVX1-NEXT: vaddss %xmm1, %xmm1, %xmm1
2611 ; AVX1-NEXT: .LBB47_3:
2612 ; AVX1-NEXT: vmovq %xmm0, %rax
2613 ; AVX1-NEXT: testq %rax, %rax
2614 ; AVX1-NEXT: js .LBB47_4
2615 ; AVX1-NEXT: # %bb.5:
2616 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
2617 ; AVX1-NEXT: jmp .LBB47_6
2618 ; AVX1-NEXT: .LBB47_4:
2619 ; AVX1-NEXT: movq %rax, %rcx
2620 ; AVX1-NEXT: shrq %rcx
2621 ; AVX1-NEXT: andl $1, %eax
2622 ; AVX1-NEXT: orq %rcx, %rax
2623 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
2624 ; AVX1-NEXT: vaddss %xmm2, %xmm2, %xmm2
2625 ; AVX1-NEXT: .LBB47_6:
2626 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
2627 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2628 ; AVX1-NEXT: vmovq %xmm0, %rax
2629 ; AVX1-NEXT: testq %rax, %rax
2630 ; AVX1-NEXT: js .LBB47_7
2631 ; AVX1-NEXT: # %bb.8:
2632 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2633 ; AVX1-NEXT: jmp .LBB47_9
2634 ; AVX1-NEXT: .LBB47_7:
2635 ; AVX1-NEXT: movq %rax, %rcx
2636 ; AVX1-NEXT: shrq %rcx
2637 ; AVX1-NEXT: andl $1, %eax
2638 ; AVX1-NEXT: orq %rcx, %rax
2639 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2640 ; AVX1-NEXT: vaddss %xmm2, %xmm2, %xmm2
2641 ; AVX1-NEXT: .LBB47_9:
2642 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
2643 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
2644 ; AVX1-NEXT: testq %rax, %rax
2645 ; AVX1-NEXT: js .LBB47_10
2646 ; AVX1-NEXT: # %bb.11:
2647 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
2648 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2649 ; AVX1-NEXT: vzeroupper
2651 ; AVX1-NEXT: .LBB47_10:
2652 ; AVX1-NEXT: movq %rax, %rcx
2653 ; AVX1-NEXT: shrq %rcx
2654 ; AVX1-NEXT: andl $1, %eax
2655 ; AVX1-NEXT: orq %rcx, %rax
2656 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
2657 ; AVX1-NEXT: vaddss %xmm0, %xmm0, %xmm0
2658 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2659 ; AVX1-NEXT: vzeroupper
2662 ; AVX2-LABEL: uitofp_4i64_to_4f32:
2664 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
2665 ; AVX2-NEXT: testq %rax, %rax
2666 ; AVX2-NEXT: js .LBB47_1
2667 ; AVX2-NEXT: # %bb.2:
2668 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2669 ; AVX2-NEXT: jmp .LBB47_3
2670 ; AVX2-NEXT: .LBB47_1:
2671 ; AVX2-NEXT: movq %rax, %rcx
2672 ; AVX2-NEXT: shrq %rcx
2673 ; AVX2-NEXT: andl $1, %eax
2674 ; AVX2-NEXT: orq %rcx, %rax
2675 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
2676 ; AVX2-NEXT: vaddss %xmm1, %xmm1, %xmm1
2677 ; AVX2-NEXT: .LBB47_3:
2678 ; AVX2-NEXT: vmovq %xmm0, %rax
2679 ; AVX2-NEXT: testq %rax, %rax
2680 ; AVX2-NEXT: js .LBB47_4
2681 ; AVX2-NEXT: # %bb.5:
2682 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
2683 ; AVX2-NEXT: jmp .LBB47_6
2684 ; AVX2-NEXT: .LBB47_4:
2685 ; AVX2-NEXT: movq %rax, %rcx
2686 ; AVX2-NEXT: shrq %rcx
2687 ; AVX2-NEXT: andl $1, %eax
2688 ; AVX2-NEXT: orq %rcx, %rax
2689 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
2690 ; AVX2-NEXT: vaddss %xmm2, %xmm2, %xmm2
2691 ; AVX2-NEXT: .LBB47_6:
2692 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
2693 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm0
2694 ; AVX2-NEXT: vmovq %xmm0, %rax
2695 ; AVX2-NEXT: testq %rax, %rax
2696 ; AVX2-NEXT: js .LBB47_7
2697 ; AVX2-NEXT: # %bb.8:
2698 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2699 ; AVX2-NEXT: jmp .LBB47_9
2700 ; AVX2-NEXT: .LBB47_7:
2701 ; AVX2-NEXT: movq %rax, %rcx
2702 ; AVX2-NEXT: shrq %rcx
2703 ; AVX2-NEXT: andl $1, %eax
2704 ; AVX2-NEXT: orq %rcx, %rax
2705 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2706 ; AVX2-NEXT: vaddss %xmm2, %xmm2, %xmm2
2707 ; AVX2-NEXT: .LBB47_9:
2708 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
2709 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
2710 ; AVX2-NEXT: testq %rax, %rax
2711 ; AVX2-NEXT: js .LBB47_10
2712 ; AVX2-NEXT: # %bb.11:
2713 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
2714 ; AVX2-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2715 ; AVX2-NEXT: vzeroupper
2717 ; AVX2-NEXT: .LBB47_10:
2718 ; AVX2-NEXT: movq %rax, %rcx
2719 ; AVX2-NEXT: shrq %rcx
2720 ; AVX2-NEXT: andl $1, %eax
2721 ; AVX2-NEXT: orq %rcx, %rax
2722 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
2723 ; AVX2-NEXT: vaddss %xmm0, %xmm0, %xmm0
2724 ; AVX2-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2725 ; AVX2-NEXT: vzeroupper
2728 ; AVX512F-LABEL: uitofp_4i64_to_4f32:
2730 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2731 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2732 ; AVX512F-NEXT: vmovq %xmm0, %rax
2733 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
2734 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
2735 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm0
2736 ; AVX512F-NEXT: vmovq %xmm0, %rax
2737 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
2738 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
2739 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2740 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
2741 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2742 ; AVX512F-NEXT: vzeroupper
2743 ; AVX512F-NEXT: retq
2745 ; AVX512VL-LABEL: uitofp_4i64_to_4f32:
2746 ; AVX512VL: # %bb.0:
2747 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2748 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2749 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2750 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
2751 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
2752 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm0
2753 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2754 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
2755 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
2756 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2757 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
2758 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2759 ; AVX512VL-NEXT: vzeroupper
2760 ; AVX512VL-NEXT: retq
2762 ; AVX512DQ-LABEL: uitofp_4i64_to_4f32:
2763 ; AVX512DQ: # %bb.0:
2764 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2765 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
2766 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2767 ; AVX512DQ-NEXT: vzeroupper
2768 ; AVX512DQ-NEXT: retq
2770 ; AVX512VLDQ-LABEL: uitofp_4i64_to_4f32:
2771 ; AVX512VLDQ: # %bb.0:
2772 ; AVX512VLDQ-NEXT: vcvtuqq2ps %ymm0, %xmm0
2773 ; AVX512VLDQ-NEXT: vzeroupper
2774 ; AVX512VLDQ-NEXT: retq
2775 %cvt = uitofp <4 x i64> %a to <4 x float>
2776 ret <4 x float> %cvt
2779 define <8 x float> @uitofp_8i32_to_8f32(<8 x i32> %a) {
2780 ; SSE2-LABEL: uitofp_8i32_to_8f32:
2782 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [65535,65535,65535,65535]
2783 ; SSE2-NEXT: movdqa %xmm0, %xmm3
2784 ; SSE2-NEXT: pand %xmm2, %xmm3
2785 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [1258291200,1258291200,1258291200,1258291200]
2786 ; SSE2-NEXT: por %xmm4, %xmm3
2787 ; SSE2-NEXT: psrld $16, %xmm0
2788 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [1392508928,1392508928,1392508928,1392508928]
2789 ; SSE2-NEXT: por %xmm5, %xmm0
2790 ; SSE2-NEXT: movaps {{.*#+}} xmm6 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
2791 ; SSE2-NEXT: addps %xmm6, %xmm0
2792 ; SSE2-NEXT: addps %xmm3, %xmm0
2793 ; SSE2-NEXT: pand %xmm1, %xmm2
2794 ; SSE2-NEXT: por %xmm4, %xmm2
2795 ; SSE2-NEXT: psrld $16, %xmm1
2796 ; SSE2-NEXT: por %xmm5, %xmm1
2797 ; SSE2-NEXT: addps %xmm6, %xmm1
2798 ; SSE2-NEXT: addps %xmm2, %xmm1
2801 ; SSE41-LABEL: uitofp_8i32_to_8f32:
2803 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [1258291200,1258291200,1258291200,1258291200]
2804 ; SSE41-NEXT: movdqa %xmm0, %xmm3
2805 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0],xmm2[1],xmm3[2],xmm2[3],xmm3[4],xmm2[5],xmm3[6],xmm2[7]
2806 ; SSE41-NEXT: psrld $16, %xmm0
2807 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [1392508928,1392508928,1392508928,1392508928]
2808 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm4[1],xmm0[2],xmm4[3],xmm0[4],xmm4[5],xmm0[6],xmm4[7]
2809 ; SSE41-NEXT: movaps {{.*#+}} xmm5 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
2810 ; SSE41-NEXT: addps %xmm5, %xmm0
2811 ; SSE41-NEXT: addps %xmm3, %xmm0
2812 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3],xmm1[4],xmm2[5],xmm1[6],xmm2[7]
2813 ; SSE41-NEXT: psrld $16, %xmm1
2814 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0],xmm4[1],xmm1[2],xmm4[3],xmm1[4],xmm4[5],xmm1[6],xmm4[7]
2815 ; SSE41-NEXT: addps %xmm5, %xmm1
2816 ; SSE41-NEXT: addps %xmm2, %xmm1
2819 ; AVX1-LABEL: uitofp_8i32_to_8f32:
2821 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm1
2822 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
2823 ; AVX1-NEXT: vpsrld $16, %xmm2, %xmm2
2824 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm1, %ymm1
2825 ; AVX1-NEXT: vcvtdq2ps %ymm1, %ymm1
2826 ; AVX1-NEXT: vmulps {{.*}}(%rip), %ymm1, %ymm1
2827 ; AVX1-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
2828 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2829 ; AVX1-NEXT: vaddps %ymm0, %ymm1, %ymm0
2832 ; AVX2-LABEL: uitofp_8i32_to_8f32:
2834 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200]
2835 ; AVX2-NEXT: vpblendw {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7],ymm0[8],ymm1[9],ymm0[10],ymm1[11],ymm0[12],ymm1[13],ymm0[14],ymm1[15]
2836 ; AVX2-NEXT: vpsrld $16, %ymm0, %ymm0
2837 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm2 = [1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928]
2838 ; AVX2-NEXT: vpblendw {{.*#+}} ymm0 = ymm0[0],ymm2[1],ymm0[2],ymm2[3],ymm0[4],ymm2[5],ymm0[6],ymm2[7],ymm0[8],ymm2[9],ymm0[10],ymm2[11],ymm0[12],ymm2[13],ymm0[14],ymm2[15]
2839 ; AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
2840 ; AVX2-NEXT: vaddps %ymm2, %ymm0, %ymm0
2841 ; AVX2-NEXT: vaddps %ymm0, %ymm1, %ymm0
2844 ; AVX512F-LABEL: uitofp_8i32_to_8f32:
2846 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2847 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
2848 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2849 ; AVX512F-NEXT: retq
2851 ; AVX512VL-LABEL: uitofp_8i32_to_8f32:
2852 ; AVX512VL: # %bb.0:
2853 ; AVX512VL-NEXT: vcvtudq2ps %ymm0, %ymm0
2854 ; AVX512VL-NEXT: retq
2856 ; AVX512DQ-LABEL: uitofp_8i32_to_8f32:
2857 ; AVX512DQ: # %bb.0:
2858 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2859 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
2860 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2861 ; AVX512DQ-NEXT: retq
2863 ; AVX512VLDQ-LABEL: uitofp_8i32_to_8f32:
2864 ; AVX512VLDQ: # %bb.0:
2865 ; AVX512VLDQ-NEXT: vcvtudq2ps %ymm0, %ymm0
2866 ; AVX512VLDQ-NEXT: retq
2867 %cvt = uitofp <8 x i32> %a to <8 x float>
2868 ret <8 x float> %cvt
2871 define <8 x float> @uitofp_8i16_to_8f32(<8 x i16> %a) {
2872 ; SSE2-LABEL: uitofp_8i16_to_8f32:
2874 ; SSE2-NEXT: pxor %xmm1, %xmm1
2875 ; SSE2-NEXT: movdqa %xmm0, %xmm2
2876 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
2877 ; SSE2-NEXT: cvtdq2ps %xmm2, %xmm2
2878 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2879 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
2880 ; SSE2-NEXT: movaps %xmm2, %xmm0
2883 ; SSE41-LABEL: uitofp_8i16_to_8f32:
2885 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2886 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
2887 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
2888 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2889 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
2890 ; SSE41-NEXT: movaps %xmm2, %xmm0
2893 ; AVX1-LABEL: uitofp_8i16_to_8f32:
2895 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
2896 ; AVX1-NEXT: vpunpckhwd {{.*#+}} xmm1 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2897 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2898 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
2899 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2902 ; AVX2-LABEL: uitofp_8i16_to_8f32:
2904 ; AVX2-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
2905 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2908 ; AVX512-LABEL: uitofp_8i16_to_8f32:
2910 ; AVX512-NEXT: vpmovzxwd {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero,xmm0[4],zero,xmm0[5],zero,xmm0[6],zero,xmm0[7],zero
2911 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
2913 %cvt = uitofp <8 x i16> %a to <8 x float>
2914 ret <8 x float> %cvt
2917 define <8 x float> @uitofp_8i8_to_8f32(<16 x i8> %a) {
2918 ; SSE2-LABEL: uitofp_8i8_to_8f32:
2920 ; SSE2-NEXT: pxor %xmm1, %xmm1
2921 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2922 ; SSE2-NEXT: movdqa %xmm0, %xmm2
2923 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
2924 ; SSE2-NEXT: cvtdq2ps %xmm2, %xmm2
2925 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2926 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
2927 ; SSE2-NEXT: movaps %xmm2, %xmm0
2930 ; SSE41-LABEL: uitofp_8i8_to_8f32:
2932 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2933 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
2934 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
2935 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2936 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
2937 ; SSE41-NEXT: movaps %xmm2, %xmm0
2940 ; AVX1-LABEL: uitofp_8i8_to_8f32:
2942 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2943 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
2944 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2945 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2946 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2949 ; AVX2-LABEL: uitofp_8i8_to_8f32:
2951 ; AVX2-NEXT: vpmovzxbd {{.*#+}} ymm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
2952 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2955 ; AVX512-LABEL: uitofp_8i8_to_8f32:
2957 ; AVX512-NEXT: vpmovzxbd {{.*#+}} ymm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
2958 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
2960 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2961 %cvt = uitofp <8 x i8> %shuf to <8 x float>
2962 ret <8 x float> %cvt
2965 define <8 x float> @uitofp_16i8_to_8f32(<16 x i8> %a) {
2966 ; SSE2-LABEL: uitofp_16i8_to_8f32:
2968 ; SSE2-NEXT: pxor %xmm1, %xmm1
2969 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2970 ; SSE2-NEXT: movdqa %xmm0, %xmm2
2971 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
2972 ; SSE2-NEXT: cvtdq2ps %xmm2, %xmm2
2973 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2974 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
2975 ; SSE2-NEXT: movaps %xmm2, %xmm0
2978 ; SSE41-LABEL: uitofp_16i8_to_8f32:
2980 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2981 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
2982 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
2983 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2984 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
2985 ; SSE41-NEXT: movaps %xmm2, %xmm0
2988 ; AVX1-LABEL: uitofp_16i8_to_8f32:
2990 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2991 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,2,3]
2992 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2993 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2994 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2997 ; AVX2-LABEL: uitofp_16i8_to_8f32:
2999 ; AVX2-NEXT: vpmovzxbd {{.*#+}} ymm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero
3000 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
3003 ; AVX512-LABEL: uitofp_16i8_to_8f32:
3005 ; AVX512-NEXT: vpmovzxbd {{.*#+}} zmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero,xmm0[8],zero,zero,zero,xmm0[9],zero,zero,zero,xmm0[10],zero,zero,zero,xmm0[11],zero,zero,zero,xmm0[12],zero,zero,zero,xmm0[13],zero,zero,zero,xmm0[14],zero,zero,zero,xmm0[15],zero,zero,zero
3006 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
3007 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3009 %cvt = uitofp <16 x i8> %a to <16 x float>
3010 %shuf = shufflevector <16 x float> %cvt, <16 x float> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
3011 ret <8 x float> %shuf
3015 ; Load Signed Integer to Double
3018 define <2 x double> @sitofp_load_2i64_to_2f64(<2 x i64> *%a) {
3019 ; SSE2-LABEL: sitofp_load_2i64_to_2f64:
3021 ; SSE2-NEXT: movdqa (%rdi), %xmm1
3022 ; SSE2-NEXT: movq %xmm1, %rax
3023 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
3024 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3025 ; SSE2-NEXT: movq %xmm1, %rax
3026 ; SSE2-NEXT: xorps %xmm1, %xmm1
3027 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
3028 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3031 ; SSE41-LABEL: sitofp_load_2i64_to_2f64:
3033 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3034 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
3035 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
3036 ; SSE41-NEXT: movq %xmm0, %rax
3037 ; SSE41-NEXT: xorps %xmm0, %xmm0
3038 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
3039 ; SSE41-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3042 ; VEX-LABEL: sitofp_load_2i64_to_2f64:
3044 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
3045 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
3046 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
3047 ; VEX-NEXT: vmovq %xmm0, %rax
3048 ; VEX-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
3049 ; VEX-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3052 ; AVX512F-LABEL: sitofp_load_2i64_to_2f64:
3054 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
3055 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
3056 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
3057 ; AVX512F-NEXT: vmovq %xmm0, %rax
3058 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
3059 ; AVX512F-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3060 ; AVX512F-NEXT: retq
3062 ; AVX512VL-LABEL: sitofp_load_2i64_to_2f64:
3063 ; AVX512VL: # %bb.0:
3064 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
3065 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
3066 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
3067 ; AVX512VL-NEXT: vmovq %xmm0, %rax
3068 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
3069 ; AVX512VL-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3070 ; AVX512VL-NEXT: retq
3072 ; AVX512DQ-LABEL: sitofp_load_2i64_to_2f64:
3073 ; AVX512DQ: # %bb.0:
3074 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3075 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
3076 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3077 ; AVX512DQ-NEXT: vzeroupper
3078 ; AVX512DQ-NEXT: retq
3080 ; AVX512VLDQ-LABEL: sitofp_load_2i64_to_2f64:
3081 ; AVX512VLDQ: # %bb.0:
3082 ; AVX512VLDQ-NEXT: vcvtqq2pd (%rdi), %xmm0
3083 ; AVX512VLDQ-NEXT: retq
3084 %ld = load <2 x i64>, <2 x i64> *%a
3085 %cvt = sitofp <2 x i64> %ld to <2 x double>
3086 ret <2 x double> %cvt
3089 define <2 x double> @sitofp_load_2i32_to_2f64(<2 x i32> *%a) {
3090 ; SSE-LABEL: sitofp_load_2i32_to_2f64:
3092 ; SSE-NEXT: cvtdq2pd (%rdi), %xmm0
3095 ; AVX-LABEL: sitofp_load_2i32_to_2f64:
3097 ; AVX-NEXT: vcvtdq2pd (%rdi), %xmm0
3099 %ld = load <2 x i32>, <2 x i32> *%a
3100 %cvt = sitofp <2 x i32> %ld to <2 x double>
3101 ret <2 x double> %cvt
3104 define <2 x double> @sitofp_volatile_load_4i32_to_2f64(<4 x i32> *%a) {
3105 ; SSE-LABEL: sitofp_volatile_load_4i32_to_2f64:
3107 ; SSE-NEXT: movaps (%rdi), %xmm0
3108 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
3111 ; AVX-LABEL: sitofp_volatile_load_4i32_to_2f64:
3113 ; AVX-NEXT: vmovaps (%rdi), %xmm0
3114 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3116 %ld = load volatile <4 x i32>, <4 x i32> *%a
3117 %b = shufflevector <4 x i32> %ld, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
3118 %cvt = sitofp <2 x i32> %b to <2 x double>
3119 ret <2 x double> %cvt
3122 define <2 x double> @sitofp_load_4i32_to_2f64_2(<4 x i32>* %x) {
3123 ; SSE-LABEL: sitofp_load_4i32_to_2f64_2:
3125 ; SSE-NEXT: cvtdq2pd (%rdi), %xmm0
3128 ; AVX-LABEL: sitofp_load_4i32_to_2f64_2:
3130 ; AVX-NEXT: vcvtdq2pd (%rdi), %xmm0
3132 %a = load <4 x i32>, <4 x i32>* %x
3133 %b = sitofp <4 x i32> %a to <4 x double>
3134 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3138 define <2 x double> @sitofp_volatile_load_4i32_to_2f64_2(<4 x i32>* %x) {
3139 ; SSE-LABEL: sitofp_volatile_load_4i32_to_2f64_2:
3141 ; SSE-NEXT: movaps (%rdi), %xmm0
3142 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
3145 ; AVX-LABEL: sitofp_volatile_load_4i32_to_2f64_2:
3147 ; AVX-NEXT: vmovaps (%rdi), %xmm0
3148 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3150 %a = load volatile <4 x i32>, <4 x i32>* %x
3151 %b = sitofp <4 x i32> %a to <4 x double>
3152 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3156 define <2 x double> @sitofp_load_2i16_to_2f64(<2 x i16> *%a) {
3157 ; SSE2-LABEL: sitofp_load_2i16_to_2f64:
3159 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3160 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
3161 ; SSE2-NEXT: psrad $16, %xmm0
3162 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3165 ; SSE41-LABEL: sitofp_load_2i16_to_2f64:
3167 ; SSE41-NEXT: pmovsxwq (%rdi), %xmm0
3168 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
3169 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3172 ; AVX-LABEL: sitofp_load_2i16_to_2f64:
3174 ; AVX-NEXT: vpmovsxwq (%rdi), %xmm0
3175 ; AVX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
3176 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3178 %ld = load <2 x i16>, <2 x i16> *%a
3179 %cvt = sitofp <2 x i16> %ld to <2 x double>
3180 ret <2 x double> %cvt
3183 define <2 x double> @sitofp_load_2i8_to_2f64(<2 x i8> *%a) {
3184 ; SSE2-LABEL: sitofp_load_2i8_to_2f64:
3186 ; SSE2-NEXT: movzwl (%rdi), %eax
3187 ; SSE2-NEXT: movd %eax, %xmm0
3188 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
3189 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
3190 ; SSE2-NEXT: psrad $24, %xmm0
3191 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3194 ; SSE41-LABEL: sitofp_load_2i8_to_2f64:
3196 ; SSE41-NEXT: pmovsxbq (%rdi), %xmm0
3197 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
3198 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3201 ; AVX-LABEL: sitofp_load_2i8_to_2f64:
3203 ; AVX-NEXT: vpmovsxbq (%rdi), %xmm0
3204 ; AVX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
3205 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3207 %ld = load <2 x i8>, <2 x i8> *%a
3208 %cvt = sitofp <2 x i8> %ld to <2 x double>
3209 ret <2 x double> %cvt
3212 define <4 x double> @sitofp_load_4i64_to_4f64(<4 x i64> *%a) {
3213 ; SSE2-LABEL: sitofp_load_4i64_to_4f64:
3215 ; SSE2-NEXT: movdqa (%rdi), %xmm1
3216 ; SSE2-NEXT: movdqa 16(%rdi), %xmm2
3217 ; SSE2-NEXT: movq %xmm1, %rax
3218 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
3219 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3220 ; SSE2-NEXT: movq %xmm1, %rax
3221 ; SSE2-NEXT: xorps %xmm1, %xmm1
3222 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
3223 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3224 ; SSE2-NEXT: movq %xmm2, %rax
3225 ; SSE2-NEXT: xorps %xmm1, %xmm1
3226 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
3227 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,0,1]
3228 ; SSE2-NEXT: movq %xmm2, %rax
3229 ; SSE2-NEXT: xorps %xmm2, %xmm2
3230 ; SSE2-NEXT: cvtsi2sd %rax, %xmm2
3231 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3234 ; SSE41-LABEL: sitofp_load_4i64_to_4f64:
3236 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3237 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
3238 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
3239 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
3240 ; SSE41-NEXT: movq %xmm0, %rax
3241 ; SSE41-NEXT: xorps %xmm0, %xmm0
3242 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
3243 ; SSE41-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3244 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
3245 ; SSE41-NEXT: xorps %xmm2, %xmm2
3246 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
3247 ; SSE41-NEXT: movq %xmm1, %rax
3248 ; SSE41-NEXT: xorps %xmm1, %xmm1
3249 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
3250 ; SSE41-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3253 ; VEX-LABEL: sitofp_load_4i64_to_4f64:
3255 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
3256 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm1
3257 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
3258 ; VEX-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
3259 ; VEX-NEXT: vmovq %xmm1, %rax
3260 ; VEX-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
3261 ; VEX-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3262 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
3263 ; VEX-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
3264 ; VEX-NEXT: vmovq %xmm0, %rax
3265 ; VEX-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
3266 ; VEX-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3267 ; VEX-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3270 ; AVX512F-LABEL: sitofp_load_4i64_to_4f64:
3272 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
3273 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
3274 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
3275 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
3276 ; AVX512F-NEXT: vmovq %xmm1, %rax
3277 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
3278 ; AVX512F-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3279 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
3280 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
3281 ; AVX512F-NEXT: vmovq %xmm0, %rax
3282 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
3283 ; AVX512F-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3284 ; AVX512F-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3285 ; AVX512F-NEXT: retq
3287 ; AVX512VL-LABEL: sitofp_load_4i64_to_4f64:
3288 ; AVX512VL: # %bb.0:
3289 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
3290 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
3291 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
3292 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
3293 ; AVX512VL-NEXT: vmovq %xmm1, %rax
3294 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
3295 ; AVX512VL-NEXT: vmovlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3296 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
3297 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
3298 ; AVX512VL-NEXT: vmovq %xmm0, %rax
3299 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
3300 ; AVX512VL-NEXT: vmovlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3301 ; AVX512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3302 ; AVX512VL-NEXT: retq
3304 ; AVX512DQ-LABEL: sitofp_load_4i64_to_4f64:
3305 ; AVX512DQ: # %bb.0:
3306 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
3307 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
3308 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3309 ; AVX512DQ-NEXT: retq
3311 ; AVX512VLDQ-LABEL: sitofp_load_4i64_to_4f64:
3312 ; AVX512VLDQ: # %bb.0:
3313 ; AVX512VLDQ-NEXT: vcvtqq2pd (%rdi), %ymm0
3314 ; AVX512VLDQ-NEXT: retq
3315 %ld = load <4 x i64>, <4 x i64> *%a
3316 %cvt = sitofp <4 x i64> %ld to <4 x double>
3317 ret <4 x double> %cvt
3320 define <4 x double> @sitofp_load_4i32_to_4f64(<4 x i32> *%a) {
3321 ; SSE-LABEL: sitofp_load_4i32_to_4f64:
3323 ; SSE-NEXT: movdqa (%rdi), %xmm1
3324 ; SSE-NEXT: cvtdq2pd %xmm1, %xmm0
3325 ; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3326 ; SSE-NEXT: cvtdq2pd %xmm1, %xmm1
3329 ; AVX-LABEL: sitofp_load_4i32_to_4f64:
3331 ; AVX-NEXT: vcvtdq2pd (%rdi), %ymm0
3333 %ld = load <4 x i32>, <4 x i32> *%a
3334 %cvt = sitofp <4 x i32> %ld to <4 x double>
3335 ret <4 x double> %cvt
3338 define <4 x double> @sitofp_load_4i16_to_4f64(<4 x i16> *%a) {
3339 ; SSE2-LABEL: sitofp_load_4i16_to_4f64:
3341 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
3342 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3343 ; SSE2-NEXT: psrad $16, %xmm1
3344 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3345 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3346 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3349 ; SSE41-LABEL: sitofp_load_4i16_to_4f64:
3351 ; SSE41-NEXT: pmovsxwd (%rdi), %xmm1
3352 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3353 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3354 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3357 ; AVX-LABEL: sitofp_load_4i16_to_4f64:
3359 ; AVX-NEXT: vpmovsxwd (%rdi), %xmm0
3360 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3362 %ld = load <4 x i16>, <4 x i16> *%a
3363 %cvt = sitofp <4 x i16> %ld to <4 x double>
3364 ret <4 x double> %cvt
3367 define <4 x double> @sitofp_load_4i8_to_4f64(<4 x i8> *%a) {
3368 ; SSE2-LABEL: sitofp_load_4i8_to_4f64:
3370 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3371 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
3372 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3373 ; SSE2-NEXT: psrad $24, %xmm1
3374 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3375 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3376 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3379 ; SSE41-LABEL: sitofp_load_4i8_to_4f64:
3381 ; SSE41-NEXT: pmovsxbd (%rdi), %xmm1
3382 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3383 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3384 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3387 ; AVX-LABEL: sitofp_load_4i8_to_4f64:
3389 ; AVX-NEXT: vpmovsxbd (%rdi), %xmm0
3390 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3392 %ld = load <4 x i8>, <4 x i8> *%a
3393 %cvt = sitofp <4 x i8> %ld to <4 x double>
3394 ret <4 x double> %cvt
3398 ; Load Unsigned Integer to Double
3401 define <2 x double> @uitofp_load_2i64_to_2f64(<2 x i64> *%a) {
3402 ; SSE2-LABEL: uitofp_load_2i64_to_2f64:
3404 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3405 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [4294967295,4294967295]
3406 ; SSE2-NEXT: pand %xmm0, %xmm1
3407 ; SSE2-NEXT: por {{.*}}(%rip), %xmm1
3408 ; SSE2-NEXT: psrlq $32, %xmm0
3409 ; SSE2-NEXT: por {{.*}}(%rip), %xmm0
3410 ; SSE2-NEXT: subpd {{.*}}(%rip), %xmm0
3411 ; SSE2-NEXT: addpd %xmm1, %xmm0
3414 ; SSE41-LABEL: uitofp_load_2i64_to_2f64:
3416 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3417 ; SSE41-NEXT: pxor %xmm1, %xmm1
3418 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
3419 ; SSE41-NEXT: por {{.*}}(%rip), %xmm1
3420 ; SSE41-NEXT: psrlq $32, %xmm0
3421 ; SSE41-NEXT: por {{.*}}(%rip), %xmm0
3422 ; SSE41-NEXT: subpd {{.*}}(%rip), %xmm0
3423 ; SSE41-NEXT: addpd %xmm1, %xmm0
3426 ; AVX1-LABEL: uitofp_load_2i64_to_2f64:
3428 ; AVX1-NEXT: vmovdqa (%rdi), %xmm0
3429 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
3430 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
3431 ; AVX1-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
3432 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm0
3433 ; AVX1-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
3434 ; AVX1-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
3435 ; AVX1-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3438 ; AVX2-LABEL: uitofp_load_2i64_to_2f64:
3440 ; AVX2-NEXT: vmovdqa (%rdi), %xmm0
3441 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3442 ; AVX2-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
3443 ; AVX2-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
3444 ; AVX2-NEXT: vpsrlq $32, %xmm0, %xmm0
3445 ; AVX2-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
3446 ; AVX2-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
3447 ; AVX2-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3450 ; AVX512F-LABEL: uitofp_load_2i64_to_2f64:
3452 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
3453 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
3454 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
3455 ; AVX512F-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
3456 ; AVX512F-NEXT: vpsrlq $32, %xmm0, %xmm0
3457 ; AVX512F-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
3458 ; AVX512F-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
3459 ; AVX512F-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3460 ; AVX512F-NEXT: retq
3462 ; AVX512VL-LABEL: uitofp_load_2i64_to_2f64:
3463 ; AVX512VL: # %bb.0:
3464 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
3465 ; AVX512VL-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm1
3466 ; AVX512VL-NEXT: vpor {{.*}}(%rip), %xmm1, %xmm1
3467 ; AVX512VL-NEXT: vpsrlq $32, %xmm0, %xmm0
3468 ; AVX512VL-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
3469 ; AVX512VL-NEXT: vsubpd {{.*}}(%rip), %xmm0, %xmm0
3470 ; AVX512VL-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3471 ; AVX512VL-NEXT: retq
3473 ; AVX512DQ-LABEL: uitofp_load_2i64_to_2f64:
3474 ; AVX512DQ: # %bb.0:
3475 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3476 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
3477 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3478 ; AVX512DQ-NEXT: vzeroupper
3479 ; AVX512DQ-NEXT: retq
3481 ; AVX512VLDQ-LABEL: uitofp_load_2i64_to_2f64:
3482 ; AVX512VLDQ: # %bb.0:
3483 ; AVX512VLDQ-NEXT: vcvtuqq2pd (%rdi), %xmm0
3484 ; AVX512VLDQ-NEXT: retq
3485 %ld = load <2 x i64>, <2 x i64> *%a
3486 %cvt = uitofp <2 x i64> %ld to <2 x double>
3487 ret <2 x double> %cvt
3490 define <2 x double> @uitofp_load_2i32_to_2f64(<2 x i32> *%a) {
3491 ; SSE2-LABEL: uitofp_load_2i32_to_2f64:
3493 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
3494 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,0,65535,0,0,0,0,0]
3495 ; SSE2-NEXT: pand %xmm0, %xmm1
3496 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3497 ; SSE2-NEXT: psrld $16, %xmm0
3498 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3499 ; SSE2-NEXT: mulpd {{.*}}(%rip), %xmm0
3500 ; SSE2-NEXT: addpd %xmm1, %xmm0
3503 ; SSE41-LABEL: uitofp_load_2i32_to_2f64:
3505 ; SSE41-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
3506 ; SSE41-NEXT: pxor %xmm1, %xmm1
3507 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
3508 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3509 ; SSE41-NEXT: psrld $16, %xmm0
3510 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3511 ; SSE41-NEXT: mulpd {{.*}}(%rip), %xmm0
3512 ; SSE41-NEXT: addpd %xmm1, %xmm0
3515 ; VEX-LABEL: uitofp_load_2i32_to_2f64:
3517 ; VEX-NEXT: vmovq {{.*#+}} xmm0 = mem[0],zero
3518 ; VEX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3519 ; VEX-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
3520 ; VEX-NEXT: vcvtdq2pd %xmm1, %xmm1
3521 ; VEX-NEXT: vpsrld $16, %xmm0, %xmm0
3522 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
3523 ; VEX-NEXT: vmulpd {{.*}}(%rip), %xmm0, %xmm0
3524 ; VEX-NEXT: vaddpd %xmm1, %xmm0, %xmm0
3527 ; AVX512F-LABEL: uitofp_load_2i32_to_2f64:
3529 ; AVX512F-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3530 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3531 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3532 ; AVX512F-NEXT: vzeroupper
3533 ; AVX512F-NEXT: retq
3535 ; AVX512VL-LABEL: uitofp_load_2i32_to_2f64:
3536 ; AVX512VL: # %bb.0:
3537 ; AVX512VL-NEXT: vcvtudq2pd (%rdi), %xmm0
3538 ; AVX512VL-NEXT: retq
3540 ; AVX512DQ-LABEL: uitofp_load_2i32_to_2f64:
3541 ; AVX512DQ: # %bb.0:
3542 ; AVX512DQ-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3543 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3544 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3545 ; AVX512DQ-NEXT: vzeroupper
3546 ; AVX512DQ-NEXT: retq
3548 ; AVX512VLDQ-LABEL: uitofp_load_2i32_to_2f64:
3549 ; AVX512VLDQ: # %bb.0:
3550 ; AVX512VLDQ-NEXT: vcvtudq2pd (%rdi), %xmm0
3551 ; AVX512VLDQ-NEXT: retq
3552 %ld = load <2 x i32>, <2 x i32> *%a
3553 %cvt = uitofp <2 x i32> %ld to <2 x double>
3554 ret <2 x double> %cvt
3557 define <2 x double> @uitofp_load_4i32_to_2f64_2(<4 x i32>* %x) {
3558 ; SSE2-LABEL: uitofp_load_4i32_to_2f64_2:
3560 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3561 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,0,65535,0,0,0,0,0]
3562 ; SSE2-NEXT: pand %xmm0, %xmm1
3563 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3564 ; SSE2-NEXT: psrld $16, %xmm0
3565 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3566 ; SSE2-NEXT: mulpd {{.*}}(%rip), %xmm0
3567 ; SSE2-NEXT: addpd %xmm1, %xmm0
3570 ; SSE41-LABEL: uitofp_load_4i32_to_2f64_2:
3572 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3573 ; SSE41-NEXT: pxor %xmm1, %xmm1
3574 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
3575 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3576 ; SSE41-NEXT: psrld $16, %xmm0
3577 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3578 ; SSE41-NEXT: mulpd {{.*}}(%rip), %xmm0
3579 ; SSE41-NEXT: addpd %xmm1, %xmm0
3582 ; VEX-LABEL: uitofp_load_4i32_to_2f64_2:
3584 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
3585 ; VEX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3586 ; VEX-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
3587 ; VEX-NEXT: vpsrld $16, %xmm0, %xmm0
3588 ; VEX-NEXT: vcvtdq2pd %xmm1, %xmm1
3589 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
3590 ; VEX-NEXT: vmulpd {{.*}}(%rip), %xmm0, %xmm0
3591 ; VEX-NEXT: vaddpd %xmm1, %xmm0, %xmm0
3594 ; AVX512F-LABEL: uitofp_load_4i32_to_2f64_2:
3596 ; AVX512F-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3597 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3598 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3599 ; AVX512F-NEXT: vzeroupper
3600 ; AVX512F-NEXT: retq
3602 ; AVX512VL-LABEL: uitofp_load_4i32_to_2f64_2:
3603 ; AVX512VL: # %bb.0:
3604 ; AVX512VL-NEXT: vcvtudq2pd (%rdi), %xmm0
3605 ; AVX512VL-NEXT: retq
3607 ; AVX512DQ-LABEL: uitofp_load_4i32_to_2f64_2:
3608 ; AVX512DQ: # %bb.0:
3609 ; AVX512DQ-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3610 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3611 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3612 ; AVX512DQ-NEXT: vzeroupper
3613 ; AVX512DQ-NEXT: retq
3615 ; AVX512VLDQ-LABEL: uitofp_load_4i32_to_2f64_2:
3616 ; AVX512VLDQ: # %bb.0:
3617 ; AVX512VLDQ-NEXT: vcvtudq2pd (%rdi), %xmm0
3618 ; AVX512VLDQ-NEXT: retq
3619 %a = load <4 x i32>, <4 x i32>* %x
3620 %b = uitofp <4 x i32> %a to <4 x double>
3621 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3625 define <2 x double> @uitofp_volatile_load_4i32_to_2f64_2(<4 x i32>* %x) {
3626 ; SSE2-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3628 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3629 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,0,65535,0,0,0,0,0]
3630 ; SSE2-NEXT: pand %xmm0, %xmm1
3631 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3632 ; SSE2-NEXT: psrld $16, %xmm0
3633 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3634 ; SSE2-NEXT: mulpd {{.*}}(%rip), %xmm0
3635 ; SSE2-NEXT: addpd %xmm1, %xmm0
3638 ; SSE41-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3640 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3641 ; SSE41-NEXT: pxor %xmm1, %xmm1
3642 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4,5,6,7]
3643 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3644 ; SSE41-NEXT: psrld $16, %xmm0
3645 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3646 ; SSE41-NEXT: mulpd {{.*}}(%rip), %xmm0
3647 ; SSE41-NEXT: addpd %xmm1, %xmm0
3650 ; VEX-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3652 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
3653 ; VEX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3654 ; VEX-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
3655 ; VEX-NEXT: vpsrld $16, %xmm0, %xmm0
3656 ; VEX-NEXT: vcvtdq2pd %xmm1, %xmm1
3657 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
3658 ; VEX-NEXT: vmulpd {{.*}}(%rip), %xmm0, %xmm0
3659 ; VEX-NEXT: vaddpd %xmm1, %xmm0, %xmm0
3662 ; AVX512F-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3664 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
3665 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3666 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3667 ; AVX512F-NEXT: vzeroupper
3668 ; AVX512F-NEXT: retq
3670 ; AVX512VL-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3671 ; AVX512VL: # %bb.0:
3672 ; AVX512VL-NEXT: vmovaps (%rdi), %xmm0
3673 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
3674 ; AVX512VL-NEXT: retq
3676 ; AVX512DQ-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3677 ; AVX512DQ: # %bb.0:
3678 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3679 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3680 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3681 ; AVX512DQ-NEXT: vzeroupper
3682 ; AVX512DQ-NEXT: retq
3684 ; AVX512VLDQ-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3685 ; AVX512VLDQ: # %bb.0:
3686 ; AVX512VLDQ-NEXT: vmovaps (%rdi), %xmm0
3687 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
3688 ; AVX512VLDQ-NEXT: retq
3689 %a = load volatile <4 x i32>, <4 x i32>* %x
3690 %b = uitofp <4 x i32> %a to <4 x double>
3691 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3695 define <2 x double> @uitofp_load_2i16_to_2f64(<2 x i16> *%a) {
3696 ; SSE2-LABEL: uitofp_load_2i16_to_2f64:
3698 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3699 ; SSE2-NEXT: pxor %xmm1, %xmm1
3700 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
3701 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3704 ; SSE41-LABEL: uitofp_load_2i16_to_2f64:
3706 ; SSE41-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3707 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
3708 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3711 ; AVX-LABEL: uitofp_load_2i16_to_2f64:
3713 ; AVX-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3714 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
3715 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3717 %ld = load <2 x i16>, <2 x i16> *%a
3718 %cvt = uitofp <2 x i16> %ld to <2 x double>
3719 ret <2 x double> %cvt
3722 define <2 x double> @uitofp_load_2i8_to_2f64(<2 x i8> *%a) {
3723 ; SSE2-LABEL: uitofp_load_2i8_to_2f64:
3725 ; SSE2-NEXT: movzwl (%rdi), %eax
3726 ; SSE2-NEXT: movd %eax, %xmm0
3727 ; SSE2-NEXT: pxor %xmm1, %xmm1
3728 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
3729 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
3730 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3733 ; SSE41-LABEL: uitofp_load_2i8_to_2f64:
3735 ; SSE41-NEXT: pmovzxbq {{.*#+}} xmm0 = mem[0],zero,zero,zero,zero,zero,zero,zero,mem[1],zero,zero,zero,zero,zero,zero,zero
3736 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
3737 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3740 ; AVX-LABEL: uitofp_load_2i8_to_2f64:
3742 ; AVX-NEXT: vpmovzxbq {{.*#+}} xmm0 = mem[0],zero,zero,zero,zero,zero,zero,zero,mem[1],zero,zero,zero,zero,zero,zero,zero
3743 ; AVX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
3744 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3746 %ld = load <2 x i8>, <2 x i8> *%a
3747 %cvt = uitofp <2 x i8> %ld to <2 x double>
3748 ret <2 x double> %cvt
3751 define <4 x double> @uitofp_load_4i64_to_4f64(<4 x i64> *%a) {
3752 ; SSE2-LABEL: uitofp_load_4i64_to_4f64:
3754 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3755 ; SSE2-NEXT: movdqa 16(%rdi), %xmm1
3756 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [4294967295,4294967295]
3757 ; SSE2-NEXT: movdqa %xmm0, %xmm3
3758 ; SSE2-NEXT: pand %xmm2, %xmm3
3759 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
3760 ; SSE2-NEXT: por %xmm4, %xmm3
3761 ; SSE2-NEXT: psrlq $32, %xmm0
3762 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
3763 ; SSE2-NEXT: por %xmm5, %xmm0
3764 ; SSE2-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
3765 ; SSE2-NEXT: subpd %xmm6, %xmm0
3766 ; SSE2-NEXT: addpd %xmm3, %xmm0
3767 ; SSE2-NEXT: pand %xmm1, %xmm2
3768 ; SSE2-NEXT: por %xmm4, %xmm2
3769 ; SSE2-NEXT: psrlq $32, %xmm1
3770 ; SSE2-NEXT: por %xmm5, %xmm1
3771 ; SSE2-NEXT: subpd %xmm6, %xmm1
3772 ; SSE2-NEXT: addpd %xmm2, %xmm1
3775 ; SSE41-LABEL: uitofp_load_4i64_to_4f64:
3777 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3778 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
3779 ; SSE41-NEXT: pxor %xmm2, %xmm2
3780 ; SSE41-NEXT: movdqa %xmm0, %xmm3
3781 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3],xmm3[4,5],xmm2[6,7]
3782 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
3783 ; SSE41-NEXT: por %xmm4, %xmm3
3784 ; SSE41-NEXT: psrlq $32, %xmm0
3785 ; SSE41-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
3786 ; SSE41-NEXT: por %xmm5, %xmm0
3787 ; SSE41-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
3788 ; SSE41-NEXT: subpd %xmm6, %xmm0
3789 ; SSE41-NEXT: addpd %xmm3, %xmm0
3790 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
3791 ; SSE41-NEXT: por %xmm4, %xmm2
3792 ; SSE41-NEXT: psrlq $32, %xmm1
3793 ; SSE41-NEXT: por %xmm5, %xmm1
3794 ; SSE41-NEXT: subpd %xmm6, %xmm1
3795 ; SSE41-NEXT: addpd %xmm2, %xmm1
3798 ; AVX1-LABEL: uitofp_load_4i64_to_4f64:
3800 ; AVX1-NEXT: vxorps %xmm0, %xmm0, %xmm0
3801 ; AVX1-NEXT: vblendps {{.*#+}} ymm0 = mem[0],ymm0[1],mem[2],ymm0[3],mem[4],ymm0[5],mem[6],ymm0[7]
3802 ; AVX1-NEXT: vorps {{.*}}(%rip), %ymm0, %ymm0
3803 ; AVX1-NEXT: vmovdqa (%rdi), %xmm1
3804 ; AVX1-NEXT: vmovdqa 16(%rdi), %xmm2
3805 ; AVX1-NEXT: vpsrlq $32, %xmm1, %xmm1
3806 ; AVX1-NEXT: vpsrlq $32, %xmm2, %xmm2
3807 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm1, %ymm1
3808 ; AVX1-NEXT: vorpd {{.*}}(%rip), %ymm1, %ymm1
3809 ; AVX1-NEXT: vsubpd {{.*}}(%rip), %ymm1, %ymm1
3810 ; AVX1-NEXT: vaddpd %ymm1, %ymm0, %ymm0
3813 ; AVX2-LABEL: uitofp_load_4i64_to_4f64:
3815 ; AVX2-NEXT: vmovdqa (%rdi), %ymm0
3816 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3817 ; AVX2-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
3818 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
3819 ; AVX2-NEXT: vpor %ymm2, %ymm1, %ymm1
3820 ; AVX2-NEXT: vpsrlq $32, %ymm0, %ymm0
3821 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
3822 ; AVX2-NEXT: vpor %ymm2, %ymm0, %ymm0
3823 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
3824 ; AVX2-NEXT: vsubpd %ymm2, %ymm0, %ymm0
3825 ; AVX2-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3828 ; AVX512F-LABEL: uitofp_load_4i64_to_4f64:
3830 ; AVX512F-NEXT: vmovdqa (%rdi), %ymm0
3831 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
3832 ; AVX512F-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
3833 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
3834 ; AVX512F-NEXT: vpor %ymm2, %ymm1, %ymm1
3835 ; AVX512F-NEXT: vpsrlq $32, %ymm0, %ymm0
3836 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
3837 ; AVX512F-NEXT: vpor %ymm2, %ymm0, %ymm0
3838 ; AVX512F-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
3839 ; AVX512F-NEXT: vsubpd %ymm2, %ymm0, %ymm0
3840 ; AVX512F-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3841 ; AVX512F-NEXT: retq
3843 ; AVX512VL-LABEL: uitofp_load_4i64_to_4f64:
3844 ; AVX512VL: # %bb.0:
3845 ; AVX512VL-NEXT: vmovdqa (%rdi), %ymm0
3846 ; AVX512VL-NEXT: vpandq {{.*}}(%rip){1to4}, %ymm0, %ymm1
3847 ; AVX512VL-NEXT: vporq {{.*}}(%rip){1to4}, %ymm1, %ymm1
3848 ; AVX512VL-NEXT: vpsrlq $32, %ymm0, %ymm0
3849 ; AVX512VL-NEXT: vporq {{.*}}(%rip){1to4}, %ymm0, %ymm0
3850 ; AVX512VL-NEXT: vsubpd {{.*}}(%rip){1to4}, %ymm0, %ymm0
3851 ; AVX512VL-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3852 ; AVX512VL-NEXT: retq
3854 ; AVX512DQ-LABEL: uitofp_load_4i64_to_4f64:
3855 ; AVX512DQ: # %bb.0:
3856 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
3857 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
3858 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3859 ; AVX512DQ-NEXT: retq
3861 ; AVX512VLDQ-LABEL: uitofp_load_4i64_to_4f64:
3862 ; AVX512VLDQ: # %bb.0:
3863 ; AVX512VLDQ-NEXT: vcvtuqq2pd (%rdi), %ymm0
3864 ; AVX512VLDQ-NEXT: retq
3865 %ld = load <4 x i64>, <4 x i64> *%a
3866 %cvt = uitofp <4 x i64> %ld to <4 x double>
3867 ret <4 x double> %cvt
3870 define <4 x double> @uitofp_load_4i32_to_4f64(<4 x i32> *%a) {
3871 ; SSE2-LABEL: uitofp_load_4i32_to_4f64:
3873 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3874 ; SSE2-NEXT: movdqa %xmm0, %xmm1
3875 ; SSE2-NEXT: psrld $16, %xmm1
3876 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3877 ; SSE2-NEXT: movapd {{.*#+}} xmm2 = [6.5536E+4,6.5536E+4]
3878 ; SSE2-NEXT: mulpd %xmm2, %xmm1
3879 ; SSE2-NEXT: movdqa {{.*#+}} xmm3 = [65535,0,65535,0,0,0,0,0]
3880 ; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm0[2,3,0,1]
3881 ; SSE2-NEXT: pand %xmm3, %xmm0
3882 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3883 ; SSE2-NEXT: addpd %xmm1, %xmm0
3884 ; SSE2-NEXT: movdqa %xmm4, %xmm1
3885 ; SSE2-NEXT: psrld $16, %xmm1
3886 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm5
3887 ; SSE2-NEXT: mulpd %xmm2, %xmm5
3888 ; SSE2-NEXT: pand %xmm3, %xmm4
3889 ; SSE2-NEXT: cvtdq2pd %xmm4, %xmm1
3890 ; SSE2-NEXT: addpd %xmm5, %xmm1
3893 ; SSE41-LABEL: uitofp_load_4i32_to_4f64:
3895 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3896 ; SSE41-NEXT: movdqa %xmm0, %xmm1
3897 ; SSE41-NEXT: psrld $16, %xmm1
3898 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3899 ; SSE41-NEXT: movapd {{.*#+}} xmm2 = [6.5536E+4,6.5536E+4]
3900 ; SSE41-NEXT: mulpd %xmm2, %xmm1
3901 ; SSE41-NEXT: pxor %xmm3, %xmm3
3902 ; SSE41-NEXT: pshufd {{.*#+}} xmm4 = xmm0[2,3,0,1]
3903 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm3[1],xmm0[2],xmm3[3],xmm0[4,5,6,7]
3904 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3905 ; SSE41-NEXT: addpd %xmm1, %xmm0
3906 ; SSE41-NEXT: movdqa %xmm4, %xmm1
3907 ; SSE41-NEXT: psrld $16, %xmm1
3908 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm5
3909 ; SSE41-NEXT: mulpd %xmm2, %xmm5
3910 ; SSE41-NEXT: pblendw {{.*#+}} xmm4 = xmm4[0],xmm3[1],xmm4[2],xmm3[3],xmm4[4,5,6,7]
3911 ; SSE41-NEXT: cvtdq2pd %xmm4, %xmm1
3912 ; SSE41-NEXT: addpd %xmm5, %xmm1
3915 ; AVX1-LABEL: uitofp_load_4i32_to_4f64:
3917 ; AVX1-NEXT: vmovdqa (%rdi), %xmm0
3918 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
3919 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
3920 ; AVX1-NEXT: vcvtdq2pd %xmm1, %ymm1
3921 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
3922 ; AVX1-NEXT: vcvtdq2pd %xmm0, %ymm0
3923 ; AVX1-NEXT: vmulpd {{.*}}(%rip), %ymm0, %ymm0
3924 ; AVX1-NEXT: vaddpd %ymm1, %ymm0, %ymm0
3927 ; AVX2-LABEL: uitofp_load_4i32_to_4f64:
3929 ; AVX2-NEXT: vmovdqa (%rdi), %xmm0
3930 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm1
3931 ; AVX2-NEXT: vcvtdq2pd %xmm1, %ymm1
3932 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm2 = [6.5536E+4,6.5536E+4,6.5536E+4,6.5536E+4]
3933 ; AVX2-NEXT: vmulpd %ymm2, %ymm1, %ymm1
3934 ; AVX2-NEXT: vxorpd %xmm2, %xmm2, %xmm2
3935 ; AVX2-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
3936 ; AVX2-NEXT: vcvtdq2pd %xmm0, %ymm0
3937 ; AVX2-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3940 ; AVX512F-LABEL: uitofp_load_4i32_to_4f64:
3942 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
3943 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3944 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3945 ; AVX512F-NEXT: retq
3947 ; AVX512VL-LABEL: uitofp_load_4i32_to_4f64:
3948 ; AVX512VL: # %bb.0:
3949 ; AVX512VL-NEXT: vcvtudq2pd (%rdi), %ymm0
3950 ; AVX512VL-NEXT: retq
3952 ; AVX512DQ-LABEL: uitofp_load_4i32_to_4f64:
3953 ; AVX512DQ: # %bb.0:
3954 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3955 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3956 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3957 ; AVX512DQ-NEXT: retq
3959 ; AVX512VLDQ-LABEL: uitofp_load_4i32_to_4f64:
3960 ; AVX512VLDQ: # %bb.0:
3961 ; AVX512VLDQ-NEXT: vcvtudq2pd (%rdi), %ymm0
3962 ; AVX512VLDQ-NEXT: retq
3963 %ld = load <4 x i32>, <4 x i32> *%a
3964 %cvt = uitofp <4 x i32> %ld to <4 x double>
3965 ret <4 x double> %cvt
3968 define <4 x double> @uitofp_load_4i16_to_4f64(<4 x i16> *%a) {
3969 ; SSE2-LABEL: uitofp_load_4i16_to_4f64:
3971 ; SSE2-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
3972 ; SSE2-NEXT: pxor %xmm0, %xmm0
3973 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3974 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3975 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3976 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3979 ; SSE41-LABEL: uitofp_load_4i16_to_4f64:
3981 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3982 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3983 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
3984 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3987 ; AVX-LABEL: uitofp_load_4i16_to_4f64:
3989 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3990 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3992 %ld = load <4 x i16>, <4 x i16> *%a
3993 %cvt = uitofp <4 x i16> %ld to <4 x double>
3994 ret <4 x double> %cvt
3997 define <4 x double> @uitofp_load_4i8_to_4f64(<4 x i8> *%a) {
3998 ; SSE2-LABEL: uitofp_load_4i8_to_4f64:
4000 ; SSE2-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
4001 ; SSE2-NEXT: pxor %xmm0, %xmm0
4002 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
4003 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
4004 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
4005 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
4006 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
4009 ; SSE41-LABEL: uitofp_load_4i8_to_4f64:
4011 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
4012 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
4013 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
4014 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
4017 ; AVX-LABEL: uitofp_load_4i8_to_4f64:
4019 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
4020 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
4022 %ld = load <4 x i8>, <4 x i8> *%a
4023 %cvt = uitofp <4 x i8> %ld to <4 x double>
4024 ret <4 x double> %cvt
4028 ; Load Signed Integer to Float
4031 define <4 x float> @sitofp_load_4i64_to_4f32(<4 x i64> *%a) {
4032 ; SSE2-LABEL: sitofp_load_4i64_to_4f32:
4034 ; SSE2-NEXT: movdqa (%rdi), %xmm1
4035 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4036 ; SSE2-NEXT: movq %xmm0, %rax
4037 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4038 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
4039 ; SSE2-NEXT: movq %xmm0, %rax
4040 ; SSE2-NEXT: xorps %xmm0, %xmm0
4041 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4042 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
4043 ; SSE2-NEXT: movq %xmm1, %rax
4044 ; SSE2-NEXT: xorps %xmm0, %xmm0
4045 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4046 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
4047 ; SSE2-NEXT: movq %xmm1, %rax
4048 ; SSE2-NEXT: xorps %xmm1, %xmm1
4049 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4050 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4051 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
4054 ; SSE41-LABEL: sitofp_load_4i64_to_4f32:
4056 ; SSE41-NEXT: movdqa (%rdi), %xmm0
4057 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
4058 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
4059 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4060 ; SSE41-NEXT: movq %xmm0, %rax
4061 ; SSE41-NEXT: xorps %xmm0, %xmm0
4062 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4063 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4064 ; SSE41-NEXT: movq %xmm1, %rax
4065 ; SSE41-NEXT: xorps %xmm2, %xmm2
4066 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4067 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4068 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
4069 ; SSE41-NEXT: xorps %xmm1, %xmm1
4070 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4071 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4074 ; VEX-LABEL: sitofp_load_4i64_to_4f32:
4076 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
4077 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm1
4078 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
4079 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
4080 ; VEX-NEXT: vmovq %xmm0, %rax
4081 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
4082 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4083 ; VEX-NEXT: vmovq %xmm1, %rax
4084 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4085 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4086 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
4087 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
4088 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4091 ; AVX512F-LABEL: sitofp_load_4i64_to_4f32:
4093 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
4094 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
4095 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
4096 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
4097 ; AVX512F-NEXT: vmovq %xmm0, %rax
4098 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
4099 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4100 ; AVX512F-NEXT: vmovq %xmm1, %rax
4101 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4102 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4103 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
4104 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
4105 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4106 ; AVX512F-NEXT: retq
4108 ; AVX512VL-LABEL: sitofp_load_4i64_to_4f32:
4109 ; AVX512VL: # %bb.0:
4110 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
4111 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
4112 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
4113 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
4114 ; AVX512VL-NEXT: vmovq %xmm0, %rax
4115 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
4116 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4117 ; AVX512VL-NEXT: vmovq %xmm1, %rax
4118 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4119 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4120 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
4121 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
4122 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4123 ; AVX512VL-NEXT: retq
4125 ; AVX512DQ-LABEL: sitofp_load_4i64_to_4f32:
4126 ; AVX512DQ: # %bb.0:
4127 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
4128 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
4129 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
4130 ; AVX512DQ-NEXT: vzeroupper
4131 ; AVX512DQ-NEXT: retq
4133 ; AVX512VLDQ-LABEL: sitofp_load_4i64_to_4f32:
4134 ; AVX512VLDQ: # %bb.0:
4135 ; AVX512VLDQ-NEXT: vcvtqq2psy (%rdi), %xmm0
4136 ; AVX512VLDQ-NEXT: retq
4137 %ld = load <4 x i64>, <4 x i64> *%a
4138 %cvt = sitofp <4 x i64> %ld to <4 x float>
4139 ret <4 x float> %cvt
4142 define <4 x float> @sitofp_load_4i32_to_4f32(<4 x i32> *%a) {
4143 ; SSE-LABEL: sitofp_load_4i32_to_4f32:
4145 ; SSE-NEXT: cvtdq2ps (%rdi), %xmm0
4148 ; AVX-LABEL: sitofp_load_4i32_to_4f32:
4150 ; AVX-NEXT: vcvtdq2ps (%rdi), %xmm0
4152 %ld = load <4 x i32>, <4 x i32> *%a
4153 %cvt = sitofp <4 x i32> %ld to <4 x float>
4154 ret <4 x float> %cvt
4157 define <4 x float> @sitofp_load_4i16_to_4f32(<4 x i16> *%a) {
4158 ; SSE2-LABEL: sitofp_load_4i16_to_4f32:
4160 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
4161 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
4162 ; SSE2-NEXT: psrad $16, %xmm0
4163 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4166 ; SSE41-LABEL: sitofp_load_4i16_to_4f32:
4168 ; SSE41-NEXT: pmovsxwd (%rdi), %xmm0
4169 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4172 ; AVX-LABEL: sitofp_load_4i16_to_4f32:
4174 ; AVX-NEXT: vpmovsxwd (%rdi), %xmm0
4175 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4177 %ld = load <4 x i16>, <4 x i16> *%a
4178 %cvt = sitofp <4 x i16> %ld to <4 x float>
4179 ret <4 x float> %cvt
4182 define <4 x float> @sitofp_load_4i8_to_4f32(<4 x i8> *%a) {
4183 ; SSE2-LABEL: sitofp_load_4i8_to_4f32:
4185 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
4186 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
4187 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
4188 ; SSE2-NEXT: psrad $24, %xmm0
4189 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4192 ; SSE41-LABEL: sitofp_load_4i8_to_4f32:
4194 ; SSE41-NEXT: pmovsxbd (%rdi), %xmm0
4195 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4198 ; AVX-LABEL: sitofp_load_4i8_to_4f32:
4200 ; AVX-NEXT: vpmovsxbd (%rdi), %xmm0
4201 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4203 %ld = load <4 x i8>, <4 x i8> *%a
4204 %cvt = sitofp <4 x i8> %ld to <4 x float>
4205 ret <4 x float> %cvt
4208 define <8 x float> @sitofp_load_8i64_to_8f32(<8 x i64> *%a) {
4209 ; SSE2-LABEL: sitofp_load_8i64_to_8f32:
4211 ; SSE2-NEXT: movdqa (%rdi), %xmm1
4212 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4213 ; SSE2-NEXT: movdqa 32(%rdi), %xmm2
4214 ; SSE2-NEXT: movdqa 48(%rdi), %xmm3
4215 ; SSE2-NEXT: movq %xmm0, %rax
4216 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4217 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
4218 ; SSE2-NEXT: movq %xmm0, %rax
4219 ; SSE2-NEXT: xorps %xmm0, %xmm0
4220 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4221 ; SSE2-NEXT: unpcklps {{.*#+}} xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
4222 ; SSE2-NEXT: movq %xmm1, %rax
4223 ; SSE2-NEXT: xorps %xmm0, %xmm0
4224 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4225 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
4226 ; SSE2-NEXT: movq %xmm1, %rax
4227 ; SSE2-NEXT: xorps %xmm1, %xmm1
4228 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4229 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4230 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm4[0]
4231 ; SSE2-NEXT: movq %xmm3, %rax
4232 ; SSE2-NEXT: xorps %xmm4, %xmm4
4233 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4234 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm3[2,3,0,1]
4235 ; SSE2-NEXT: movq %xmm1, %rax
4236 ; SSE2-NEXT: xorps %xmm1, %xmm1
4237 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4238 ; SSE2-NEXT: unpcklps {{.*#+}} xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
4239 ; SSE2-NEXT: movq %xmm2, %rax
4240 ; SSE2-NEXT: xorps %xmm1, %xmm1
4241 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4242 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,0,1]
4243 ; SSE2-NEXT: movq %xmm2, %rax
4244 ; SSE2-NEXT: xorps %xmm2, %xmm2
4245 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4246 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
4247 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm4[0]
4250 ; SSE41-LABEL: sitofp_load_8i64_to_8f32:
4252 ; SSE41-NEXT: movdqa (%rdi), %xmm0
4253 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
4254 ; SSE41-NEXT: movdqa 32(%rdi), %xmm2
4255 ; SSE41-NEXT: movdqa 48(%rdi), %xmm3
4256 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
4257 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
4258 ; SSE41-NEXT: movq %xmm0, %rax
4259 ; SSE41-NEXT: xorps %xmm0, %xmm0
4260 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4261 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm4[0],xmm0[2,3]
4262 ; SSE41-NEXT: movq %xmm1, %rax
4263 ; SSE41-NEXT: xorps %xmm4, %xmm4
4264 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
4265 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm4[0],xmm0[3]
4266 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
4267 ; SSE41-NEXT: xorps %xmm1, %xmm1
4268 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4269 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4270 ; SSE41-NEXT: pextrq $1, %xmm2, %rax
4271 ; SSE41-NEXT: xorps %xmm4, %xmm4
4272 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
4273 ; SSE41-NEXT: movq %xmm2, %rax
4274 ; SSE41-NEXT: xorps %xmm1, %xmm1
4275 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4276 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0],xmm4[0],xmm1[2,3]
4277 ; SSE41-NEXT: movq %xmm3, %rax
4278 ; SSE41-NEXT: xorps %xmm2, %xmm2
4279 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4280 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
4281 ; SSE41-NEXT: pextrq $1, %xmm3, %rax
4282 ; SSE41-NEXT: xorps %xmm2, %xmm2
4283 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4284 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1,2],xmm2[0]
4287 ; VEX-LABEL: sitofp_load_8i64_to_8f32:
4289 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
4290 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm1
4291 ; VEX-NEXT: vmovdqa 32(%rdi), %xmm2
4292 ; VEX-NEXT: vmovdqa 48(%rdi), %xmm3
4293 ; VEX-NEXT: vpextrq $1, %xmm2, %rax
4294 ; VEX-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
4295 ; VEX-NEXT: vmovq %xmm2, %rax
4296 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm2
4297 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
4298 ; VEX-NEXT: vmovq %xmm3, %rax
4299 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4300 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
4301 ; VEX-NEXT: vpextrq $1, %xmm3, %rax
4302 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4303 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
4304 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
4305 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4306 ; VEX-NEXT: vmovq %xmm0, %rax
4307 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4308 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
4309 ; VEX-NEXT: vmovq %xmm1, %rax
4310 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4311 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
4312 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
4313 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4314 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4315 ; VEX-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4318 ; AVX512F-LABEL: sitofp_load_8i64_to_8f32:
4320 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
4321 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
4322 ; AVX512F-NEXT: vmovdqa 32(%rdi), %xmm2
4323 ; AVX512F-NEXT: vmovdqa 48(%rdi), %xmm3
4324 ; AVX512F-NEXT: vpextrq $1, %xmm2, %rax
4325 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
4326 ; AVX512F-NEXT: vmovq %xmm2, %rax
4327 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm2
4328 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
4329 ; AVX512F-NEXT: vmovq %xmm3, %rax
4330 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4331 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
4332 ; AVX512F-NEXT: vpextrq $1, %xmm3, %rax
4333 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4334 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
4335 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
4336 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4337 ; AVX512F-NEXT: vmovq %xmm0, %rax
4338 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4339 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
4340 ; AVX512F-NEXT: vmovq %xmm1, %rax
4341 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4342 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
4343 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
4344 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4345 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4346 ; AVX512F-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4347 ; AVX512F-NEXT: retq
4349 ; AVX512VL-LABEL: sitofp_load_8i64_to_8f32:
4350 ; AVX512VL: # %bb.0:
4351 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
4352 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
4353 ; AVX512VL-NEXT: vmovdqa 32(%rdi), %xmm2
4354 ; AVX512VL-NEXT: vmovdqa 48(%rdi), %xmm3
4355 ; AVX512VL-NEXT: vpextrq $1, %xmm2, %rax
4356 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
4357 ; AVX512VL-NEXT: vmovq %xmm2, %rax
4358 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm2
4359 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
4360 ; AVX512VL-NEXT: vmovq %xmm3, %rax
4361 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4362 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
4363 ; AVX512VL-NEXT: vpextrq $1, %xmm3, %rax
4364 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4365 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
4366 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
4367 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4368 ; AVX512VL-NEXT: vmovq %xmm0, %rax
4369 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4370 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
4371 ; AVX512VL-NEXT: vmovq %xmm1, %rax
4372 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4373 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
4374 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
4375 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4376 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4377 ; AVX512VL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4378 ; AVX512VL-NEXT: retq
4380 ; AVX512DQ-LABEL: sitofp_load_8i64_to_8f32:
4381 ; AVX512DQ: # %bb.0:
4382 ; AVX512DQ-NEXT: vcvtqq2ps (%rdi), %ymm0
4383 ; AVX512DQ-NEXT: retq
4385 ; AVX512VLDQ-LABEL: sitofp_load_8i64_to_8f32:
4386 ; AVX512VLDQ: # %bb.0:
4387 ; AVX512VLDQ-NEXT: vcvtqq2ps (%rdi), %ymm0
4388 ; AVX512VLDQ-NEXT: retq
4389 %ld = load <8 x i64>, <8 x i64> *%a
4390 %cvt = sitofp <8 x i64> %ld to <8 x float>
4391 ret <8 x float> %cvt
4394 define <8 x float> @sitofp_load_8i32_to_8f32(<8 x i32> *%a) {
4395 ; SSE-LABEL: sitofp_load_8i32_to_8f32:
4397 ; SSE-NEXT: cvtdq2ps (%rdi), %xmm0
4398 ; SSE-NEXT: cvtdq2ps 16(%rdi), %xmm1
4401 ; AVX-LABEL: sitofp_load_8i32_to_8f32:
4403 ; AVX-NEXT: vcvtdq2ps (%rdi), %ymm0
4405 %ld = load <8 x i32>, <8 x i32> *%a
4406 %cvt = sitofp <8 x i32> %ld to <8 x float>
4407 ret <8 x float> %cvt
4410 define <8 x float> @sitofp_load_8i16_to_8f32(<8 x i16> *%a) {
4411 ; SSE2-LABEL: sitofp_load_8i16_to_8f32:
4413 ; SSE2-NEXT: movdqa (%rdi), %xmm1
4414 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4415 ; SSE2-NEXT: psrad $16, %xmm0
4416 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4417 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4,4,5,5,6,6,7,7]
4418 ; SSE2-NEXT: psrad $16, %xmm1
4419 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
4422 ; SSE41-LABEL: sitofp_load_8i16_to_8f32:
4424 ; SSE41-NEXT: pmovsxwd 8(%rdi), %xmm1
4425 ; SSE41-NEXT: pmovsxwd (%rdi), %xmm0
4426 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4427 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
4430 ; AVX1-LABEL: sitofp_load_8i16_to_8f32:
4432 ; AVX1-NEXT: vpmovsxwd 8(%rdi), %xmm0
4433 ; AVX1-NEXT: vpmovsxwd (%rdi), %xmm1
4434 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4435 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
4438 ; AVX2-LABEL: sitofp_load_8i16_to_8f32:
4440 ; AVX2-NEXT: vpmovsxwd (%rdi), %ymm0
4441 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
4444 ; AVX512-LABEL: sitofp_load_8i16_to_8f32:
4446 ; AVX512-NEXT: vpmovsxwd (%rdi), %ymm0
4447 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
4449 %ld = load <8 x i16>, <8 x i16> *%a
4450 %cvt = sitofp <8 x i16> %ld to <8 x float>
4451 ret <8 x float> %cvt
4454 define <8 x float> @sitofp_load_8i8_to_8f32(<8 x i8> *%a) {
4455 ; SSE2-LABEL: sitofp_load_8i8_to_8f32:
4457 ; SSE2-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
4458 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
4459 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4460 ; SSE2-NEXT: psrad $24, %xmm0
4461 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4462 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4,4,5,5,6,6,7,7]
4463 ; SSE2-NEXT: psrad $24, %xmm1
4464 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
4467 ; SSE41-LABEL: sitofp_load_8i8_to_8f32:
4469 ; SSE41-NEXT: pmovsxbd 4(%rdi), %xmm1
4470 ; SSE41-NEXT: pmovsxbd (%rdi), %xmm0
4471 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4472 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
4475 ; AVX1-LABEL: sitofp_load_8i8_to_8f32:
4477 ; AVX1-NEXT: vpmovsxbd 4(%rdi), %xmm0
4478 ; AVX1-NEXT: vpmovsxbd (%rdi), %xmm1
4479 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4480 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
4483 ; AVX2-LABEL: sitofp_load_8i8_to_8f32:
4485 ; AVX2-NEXT: vpmovsxbd (%rdi), %ymm0
4486 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
4489 ; AVX512-LABEL: sitofp_load_8i8_to_8f32:
4491 ; AVX512-NEXT: vpmovsxbd (%rdi), %ymm0
4492 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
4494 %ld = load <8 x i8>, <8 x i8> *%a
4495 %cvt = sitofp <8 x i8> %ld to <8 x float>
4496 ret <8 x float> %cvt
4500 ; Load Unsigned Integer to Float
4503 define <4 x float> @uitofp_load_4i64_to_4f32(<4 x i64> *%a) {
4504 ; SSE2-LABEL: uitofp_load_4i64_to_4f32:
4506 ; SSE2-NEXT: movdqa (%rdi), %xmm2
4507 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4508 ; SSE2-NEXT: movq %xmm0, %rax
4509 ; SSE2-NEXT: testq %rax, %rax
4510 ; SSE2-NEXT: js .LBB81_1
4511 ; SSE2-NEXT: # %bb.2:
4512 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4513 ; SSE2-NEXT: jmp .LBB81_3
4514 ; SSE2-NEXT: .LBB81_1:
4515 ; SSE2-NEXT: movq %rax, %rcx
4516 ; SSE2-NEXT: shrq %rcx
4517 ; SSE2-NEXT: andl $1, %eax
4518 ; SSE2-NEXT: orq %rcx, %rax
4519 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4520 ; SSE2-NEXT: addss %xmm1, %xmm1
4521 ; SSE2-NEXT: .LBB81_3:
4522 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
4523 ; SSE2-NEXT: movq %xmm0, %rax
4524 ; SSE2-NEXT: testq %rax, %rax
4525 ; SSE2-NEXT: js .LBB81_4
4526 ; SSE2-NEXT: # %bb.5:
4527 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4528 ; SSE2-NEXT: jmp .LBB81_6
4529 ; SSE2-NEXT: .LBB81_4:
4530 ; SSE2-NEXT: movq %rax, %rcx
4531 ; SSE2-NEXT: shrq %rcx
4532 ; SSE2-NEXT: andl $1, %eax
4533 ; SSE2-NEXT: orq %rcx, %rax
4534 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4535 ; SSE2-NEXT: addss %xmm3, %xmm3
4536 ; SSE2-NEXT: .LBB81_6:
4537 ; SSE2-NEXT: movq %xmm2, %rax
4538 ; SSE2-NEXT: testq %rax, %rax
4539 ; SSE2-NEXT: js .LBB81_7
4540 ; SSE2-NEXT: # %bb.8:
4541 ; SSE2-NEXT: xorps %xmm0, %xmm0
4542 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4543 ; SSE2-NEXT: jmp .LBB81_9
4544 ; SSE2-NEXT: .LBB81_7:
4545 ; SSE2-NEXT: movq %rax, %rcx
4546 ; SSE2-NEXT: shrq %rcx
4547 ; SSE2-NEXT: andl $1, %eax
4548 ; SSE2-NEXT: orq %rcx, %rax
4549 ; SSE2-NEXT: xorps %xmm0, %xmm0
4550 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4551 ; SSE2-NEXT: addss %xmm0, %xmm0
4552 ; SSE2-NEXT: .LBB81_9:
4553 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
4554 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,0,1]
4555 ; SSE2-NEXT: movq %xmm2, %rax
4556 ; SSE2-NEXT: testq %rax, %rax
4557 ; SSE2-NEXT: js .LBB81_10
4558 ; SSE2-NEXT: # %bb.11:
4559 ; SSE2-NEXT: xorps %xmm2, %xmm2
4560 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4561 ; SSE2-NEXT: jmp .LBB81_12
4562 ; SSE2-NEXT: .LBB81_10:
4563 ; SSE2-NEXT: movq %rax, %rcx
4564 ; SSE2-NEXT: shrq %rcx
4565 ; SSE2-NEXT: andl $1, %eax
4566 ; SSE2-NEXT: orq %rcx, %rax
4567 ; SSE2-NEXT: xorps %xmm2, %xmm2
4568 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4569 ; SSE2-NEXT: addss %xmm2, %xmm2
4570 ; SSE2-NEXT: .LBB81_12:
4571 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
4572 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4575 ; SSE41-LABEL: uitofp_load_4i64_to_4f32:
4577 ; SSE41-NEXT: movdqa (%rdi), %xmm0
4578 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
4579 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
4580 ; SSE41-NEXT: testq %rax, %rax
4581 ; SSE41-NEXT: js .LBB81_1
4582 ; SSE41-NEXT: # %bb.2:
4583 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4584 ; SSE41-NEXT: jmp .LBB81_3
4585 ; SSE41-NEXT: .LBB81_1:
4586 ; SSE41-NEXT: movq %rax, %rcx
4587 ; SSE41-NEXT: shrq %rcx
4588 ; SSE41-NEXT: andl $1, %eax
4589 ; SSE41-NEXT: orq %rcx, %rax
4590 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4591 ; SSE41-NEXT: addss %xmm2, %xmm2
4592 ; SSE41-NEXT: .LBB81_3:
4593 ; SSE41-NEXT: movq %xmm0, %rax
4594 ; SSE41-NEXT: testq %rax, %rax
4595 ; SSE41-NEXT: js .LBB81_4
4596 ; SSE41-NEXT: # %bb.5:
4597 ; SSE41-NEXT: xorps %xmm0, %xmm0
4598 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4599 ; SSE41-NEXT: jmp .LBB81_6
4600 ; SSE41-NEXT: .LBB81_4:
4601 ; SSE41-NEXT: movq %rax, %rcx
4602 ; SSE41-NEXT: shrq %rcx
4603 ; SSE41-NEXT: andl $1, %eax
4604 ; SSE41-NEXT: orq %rcx, %rax
4605 ; SSE41-NEXT: xorps %xmm0, %xmm0
4606 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4607 ; SSE41-NEXT: addss %xmm0, %xmm0
4608 ; SSE41-NEXT: .LBB81_6:
4609 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4610 ; SSE41-NEXT: movq %xmm1, %rax
4611 ; SSE41-NEXT: testq %rax, %rax
4612 ; SSE41-NEXT: js .LBB81_7
4613 ; SSE41-NEXT: # %bb.8:
4614 ; SSE41-NEXT: xorps %xmm2, %xmm2
4615 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4616 ; SSE41-NEXT: jmp .LBB81_9
4617 ; SSE41-NEXT: .LBB81_7:
4618 ; SSE41-NEXT: movq %rax, %rcx
4619 ; SSE41-NEXT: shrq %rcx
4620 ; SSE41-NEXT: andl $1, %eax
4621 ; SSE41-NEXT: orq %rcx, %rax
4622 ; SSE41-NEXT: xorps %xmm2, %xmm2
4623 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4624 ; SSE41-NEXT: addss %xmm2, %xmm2
4625 ; SSE41-NEXT: .LBB81_9:
4626 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4627 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
4628 ; SSE41-NEXT: testq %rax, %rax
4629 ; SSE41-NEXT: js .LBB81_10
4630 ; SSE41-NEXT: # %bb.11:
4631 ; SSE41-NEXT: xorps %xmm1, %xmm1
4632 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4633 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4635 ; SSE41-NEXT: .LBB81_10:
4636 ; SSE41-NEXT: movq %rax, %rcx
4637 ; SSE41-NEXT: shrq %rcx
4638 ; SSE41-NEXT: andl $1, %eax
4639 ; SSE41-NEXT: orq %rcx, %rax
4640 ; SSE41-NEXT: xorps %xmm1, %xmm1
4641 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4642 ; SSE41-NEXT: addss %xmm1, %xmm1
4643 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4646 ; VEX-LABEL: uitofp_load_4i64_to_4f32:
4648 ; VEX-NEXT: vmovdqa (%rdi), %xmm2
4649 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm0
4650 ; VEX-NEXT: vpextrq $1, %xmm2, %rax
4651 ; VEX-NEXT: testq %rax, %rax
4652 ; VEX-NEXT: js .LBB81_1
4653 ; VEX-NEXT: # %bb.2:
4654 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
4655 ; VEX-NEXT: jmp .LBB81_3
4656 ; VEX-NEXT: .LBB81_1:
4657 ; VEX-NEXT: movq %rax, %rcx
4658 ; VEX-NEXT: shrq %rcx
4659 ; VEX-NEXT: andl $1, %eax
4660 ; VEX-NEXT: orq %rcx, %rax
4661 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
4662 ; VEX-NEXT: vaddss %xmm1, %xmm1, %xmm1
4663 ; VEX-NEXT: .LBB81_3:
4664 ; VEX-NEXT: vmovq %xmm2, %rax
4665 ; VEX-NEXT: testq %rax, %rax
4666 ; VEX-NEXT: js .LBB81_4
4667 ; VEX-NEXT: # %bb.5:
4668 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4669 ; VEX-NEXT: jmp .LBB81_6
4670 ; VEX-NEXT: .LBB81_4:
4671 ; VEX-NEXT: movq %rax, %rcx
4672 ; VEX-NEXT: shrq %rcx
4673 ; VEX-NEXT: andl $1, %eax
4674 ; VEX-NEXT: orq %rcx, %rax
4675 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4676 ; VEX-NEXT: vaddss %xmm2, %xmm2, %xmm2
4677 ; VEX-NEXT: .LBB81_6:
4678 ; VEX-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
4679 ; VEX-NEXT: vmovq %xmm0, %rax
4680 ; VEX-NEXT: testq %rax, %rax
4681 ; VEX-NEXT: js .LBB81_7
4682 ; VEX-NEXT: # %bb.8:
4683 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4684 ; VEX-NEXT: jmp .LBB81_9
4685 ; VEX-NEXT: .LBB81_7:
4686 ; VEX-NEXT: movq %rax, %rcx
4687 ; VEX-NEXT: shrq %rcx
4688 ; VEX-NEXT: andl $1, %eax
4689 ; VEX-NEXT: orq %rcx, %rax
4690 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4691 ; VEX-NEXT: vaddss %xmm2, %xmm2, %xmm2
4692 ; VEX-NEXT: .LBB81_9:
4693 ; VEX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
4694 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
4695 ; VEX-NEXT: testq %rax, %rax
4696 ; VEX-NEXT: js .LBB81_10
4697 ; VEX-NEXT: # %bb.11:
4698 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
4699 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
4701 ; VEX-NEXT: .LBB81_10:
4702 ; VEX-NEXT: movq %rax, %rcx
4703 ; VEX-NEXT: shrq %rcx
4704 ; VEX-NEXT: andl $1, %eax
4705 ; VEX-NEXT: orq %rcx, %rax
4706 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
4707 ; VEX-NEXT: vaddss %xmm0, %xmm0, %xmm0
4708 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
4711 ; AVX512F-LABEL: uitofp_load_4i64_to_4f32:
4713 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
4714 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
4715 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
4716 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
4717 ; AVX512F-NEXT: vmovq %xmm0, %rax
4718 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
4719 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4720 ; AVX512F-NEXT: vmovq %xmm1, %rax
4721 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
4722 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4723 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
4724 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm1
4725 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4726 ; AVX512F-NEXT: retq
4728 ; AVX512VL-LABEL: uitofp_load_4i64_to_4f32:
4729 ; AVX512VL: # %bb.0:
4730 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
4731 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
4732 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
4733 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
4734 ; AVX512VL-NEXT: vmovq %xmm0, %rax
4735 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
4736 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4737 ; AVX512VL-NEXT: vmovq %xmm1, %rax
4738 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
4739 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4740 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
4741 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm1
4742 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4743 ; AVX512VL-NEXT: retq
4745 ; AVX512DQ-LABEL: uitofp_load_4i64_to_4f32:
4746 ; AVX512DQ: # %bb.0:
4747 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
4748 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
4749 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
4750 ; AVX512DQ-NEXT: vzeroupper
4751 ; AVX512DQ-NEXT: retq
4753 ; AVX512VLDQ-LABEL: uitofp_load_4i64_to_4f32:
4754 ; AVX512VLDQ: # %bb.0:
4755 ; AVX512VLDQ-NEXT: vcvtuqq2psy (%rdi), %xmm0
4756 ; AVX512VLDQ-NEXT: retq
4757 %ld = load <4 x i64>, <4 x i64> *%a
4758 %cvt = uitofp <4 x i64> %ld to <4 x float>
4759 ret <4 x float> %cvt
4762 define <4 x float> @uitofp_load_4i32_to_4f32(<4 x i32> *%a) {
4763 ; SSE2-LABEL: uitofp_load_4i32_to_4f32:
4765 ; SSE2-NEXT: movdqa (%rdi), %xmm0
4766 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
4767 ; SSE2-NEXT: pand %xmm0, %xmm1
4768 ; SSE2-NEXT: por {{.*}}(%rip), %xmm1
4769 ; SSE2-NEXT: psrld $16, %xmm0
4770 ; SSE2-NEXT: por {{.*}}(%rip), %xmm0
4771 ; SSE2-NEXT: addps {{.*}}(%rip), %xmm0
4772 ; SSE2-NEXT: addps %xmm1, %xmm0
4775 ; SSE41-LABEL: uitofp_load_4i32_to_4f32:
4777 ; SSE41-NEXT: movdqa (%rdi), %xmm0
4778 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
4779 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
4780 ; SSE41-NEXT: psrld $16, %xmm0
4781 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
4782 ; SSE41-NEXT: addps {{.*}}(%rip), %xmm0
4783 ; SSE41-NEXT: addps %xmm1, %xmm0
4786 ; AVX1-LABEL: uitofp_load_4i32_to_4f32:
4788 ; AVX1-NEXT: vmovdqa (%rdi), %xmm0
4789 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
4790 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
4791 ; AVX1-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
4792 ; AVX1-NEXT: vaddps {{.*}}(%rip), %xmm0, %xmm0
4793 ; AVX1-NEXT: vaddps %xmm0, %xmm1, %xmm0
4796 ; AVX2-LABEL: uitofp_load_4i32_to_4f32:
4798 ; AVX2-NEXT: vmovdqa (%rdi), %xmm0
4799 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
4800 ; AVX2-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
4801 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm0
4802 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm2 = [1392508928,1392508928,1392508928,1392508928]
4803 ; AVX2-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
4804 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm2 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
4805 ; AVX2-NEXT: vaddps %xmm2, %xmm0, %xmm0
4806 ; AVX2-NEXT: vaddps %xmm0, %xmm1, %xmm0
4809 ; AVX512F-LABEL: uitofp_load_4i32_to_4f32:
4811 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
4812 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
4813 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4814 ; AVX512F-NEXT: vzeroupper
4815 ; AVX512F-NEXT: retq
4817 ; AVX512VL-LABEL: uitofp_load_4i32_to_4f32:
4818 ; AVX512VL: # %bb.0:
4819 ; AVX512VL-NEXT: vcvtudq2ps (%rdi), %xmm0
4820 ; AVX512VL-NEXT: retq
4822 ; AVX512DQ-LABEL: uitofp_load_4i32_to_4f32:
4823 ; AVX512DQ: # %bb.0:
4824 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
4825 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
4826 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4827 ; AVX512DQ-NEXT: vzeroupper
4828 ; AVX512DQ-NEXT: retq
4830 ; AVX512VLDQ-LABEL: uitofp_load_4i32_to_4f32:
4831 ; AVX512VLDQ: # %bb.0:
4832 ; AVX512VLDQ-NEXT: vcvtudq2ps (%rdi), %xmm0
4833 ; AVX512VLDQ-NEXT: retq
4834 %ld = load <4 x i32>, <4 x i32> *%a
4835 %cvt = uitofp <4 x i32> %ld to <4 x float>
4836 ret <4 x float> %cvt
4839 define <4 x float> @uitofp_load_4i16_to_4f32(<4 x i16> *%a) {
4840 ; SSE2-LABEL: uitofp_load_4i16_to_4f32:
4842 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
4843 ; SSE2-NEXT: pxor %xmm1, %xmm1
4844 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4845 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4848 ; SSE41-LABEL: uitofp_load_4i16_to_4f32:
4850 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
4851 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4854 ; AVX-LABEL: uitofp_load_4i16_to_4f32:
4856 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
4857 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4859 %ld = load <4 x i16>, <4 x i16> *%a
4860 %cvt = uitofp <4 x i16> %ld to <4 x float>
4861 ret <4 x float> %cvt
4864 define <4 x float> @uitofp_load_4i8_to_4f32(<4 x i8> *%a) {
4865 ; SSE2-LABEL: uitofp_load_4i8_to_4f32:
4867 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
4868 ; SSE2-NEXT: pxor %xmm1, %xmm1
4869 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
4870 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4871 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4874 ; SSE41-LABEL: uitofp_load_4i8_to_4f32:
4876 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
4877 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4880 ; AVX-LABEL: uitofp_load_4i8_to_4f32:
4882 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
4883 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4885 %ld = load <4 x i8>, <4 x i8> *%a
4886 %cvt = uitofp <4 x i8> %ld to <4 x float>
4887 ret <4 x float> %cvt
4890 define <8 x float> @uitofp_load_8i64_to_8f32(<8 x i64> *%a) {
4891 ; SSE2-LABEL: uitofp_load_8i64_to_8f32:
4893 ; SSE2-NEXT: movdqa (%rdi), %xmm5
4894 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4895 ; SSE2-NEXT: movdqa 32(%rdi), %xmm2
4896 ; SSE2-NEXT: movdqa 48(%rdi), %xmm1
4897 ; SSE2-NEXT: movq %xmm0, %rax
4898 ; SSE2-NEXT: testq %rax, %rax
4899 ; SSE2-NEXT: js .LBB85_1
4900 ; SSE2-NEXT: # %bb.2:
4901 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4902 ; SSE2-NEXT: jmp .LBB85_3
4903 ; SSE2-NEXT: .LBB85_1:
4904 ; SSE2-NEXT: movq %rax, %rcx
4905 ; SSE2-NEXT: shrq %rcx
4906 ; SSE2-NEXT: andl $1, %eax
4907 ; SSE2-NEXT: orq %rcx, %rax
4908 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4909 ; SSE2-NEXT: addss %xmm3, %xmm3
4910 ; SSE2-NEXT: .LBB85_3:
4911 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
4912 ; SSE2-NEXT: movq %xmm0, %rax
4913 ; SSE2-NEXT: testq %rax, %rax
4914 ; SSE2-NEXT: js .LBB85_4
4915 ; SSE2-NEXT: # %bb.5:
4916 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4917 ; SSE2-NEXT: jmp .LBB85_6
4918 ; SSE2-NEXT: .LBB85_4:
4919 ; SSE2-NEXT: movq %rax, %rcx
4920 ; SSE2-NEXT: shrq %rcx
4921 ; SSE2-NEXT: andl $1, %eax
4922 ; SSE2-NEXT: orq %rcx, %rax
4923 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4924 ; SSE2-NEXT: addss %xmm4, %xmm4
4925 ; SSE2-NEXT: .LBB85_6:
4926 ; SSE2-NEXT: movq %xmm5, %rax
4927 ; SSE2-NEXT: testq %rax, %rax
4928 ; SSE2-NEXT: js .LBB85_7
4929 ; SSE2-NEXT: # %bb.8:
4930 ; SSE2-NEXT: xorps %xmm0, %xmm0
4931 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4932 ; SSE2-NEXT: jmp .LBB85_9
4933 ; SSE2-NEXT: .LBB85_7:
4934 ; SSE2-NEXT: movq %rax, %rcx
4935 ; SSE2-NEXT: shrq %rcx
4936 ; SSE2-NEXT: andl $1, %eax
4937 ; SSE2-NEXT: orq %rcx, %rax
4938 ; SSE2-NEXT: xorps %xmm0, %xmm0
4939 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4940 ; SSE2-NEXT: addss %xmm0, %xmm0
4941 ; SSE2-NEXT: .LBB85_9:
4942 ; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm5[2,3,0,1]
4943 ; SSE2-NEXT: movq %xmm5, %rax
4944 ; SSE2-NEXT: testq %rax, %rax
4945 ; SSE2-NEXT: js .LBB85_10
4946 ; SSE2-NEXT: # %bb.11:
4947 ; SSE2-NEXT: cvtsi2ss %rax, %xmm6
4948 ; SSE2-NEXT: jmp .LBB85_12
4949 ; SSE2-NEXT: .LBB85_10:
4950 ; SSE2-NEXT: movq %rax, %rcx
4951 ; SSE2-NEXT: shrq %rcx
4952 ; SSE2-NEXT: andl $1, %eax
4953 ; SSE2-NEXT: orq %rcx, %rax
4954 ; SSE2-NEXT: cvtsi2ss %rax, %xmm6
4955 ; SSE2-NEXT: addss %xmm6, %xmm6
4956 ; SSE2-NEXT: .LBB85_12:
4957 ; SSE2-NEXT: movq %xmm1, %rax
4958 ; SSE2-NEXT: testq %rax, %rax
4959 ; SSE2-NEXT: js .LBB85_13
4960 ; SSE2-NEXT: # %bb.14:
4961 ; SSE2-NEXT: xorps %xmm5, %xmm5
4962 ; SSE2-NEXT: cvtsi2ss %rax, %xmm5
4963 ; SSE2-NEXT: jmp .LBB85_15
4964 ; SSE2-NEXT: .LBB85_13:
4965 ; SSE2-NEXT: movq %rax, %rcx
4966 ; SSE2-NEXT: shrq %rcx
4967 ; SSE2-NEXT: andl $1, %eax
4968 ; SSE2-NEXT: orq %rcx, %rax
4969 ; SSE2-NEXT: xorps %xmm5, %xmm5
4970 ; SSE2-NEXT: cvtsi2ss %rax, %xmm5
4971 ; SSE2-NEXT: addss %xmm5, %xmm5
4972 ; SSE2-NEXT: .LBB85_15:
4973 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,0,1]
4974 ; SSE2-NEXT: movq %xmm1, %rax
4975 ; SSE2-NEXT: testq %rax, %rax
4976 ; SSE2-NEXT: js .LBB85_16
4977 ; SSE2-NEXT: # %bb.17:
4978 ; SSE2-NEXT: cvtsi2ss %rax, %xmm7
4979 ; SSE2-NEXT: jmp .LBB85_18
4980 ; SSE2-NEXT: .LBB85_16:
4981 ; SSE2-NEXT: movq %rax, %rcx
4982 ; SSE2-NEXT: shrq %rcx
4983 ; SSE2-NEXT: andl $1, %eax
4984 ; SSE2-NEXT: orq %rcx, %rax
4985 ; SSE2-NEXT: cvtsi2ss %rax, %xmm7
4986 ; SSE2-NEXT: addss %xmm7, %xmm7
4987 ; SSE2-NEXT: .LBB85_18:
4988 ; SSE2-NEXT: unpcklps {{.*#+}} xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
4989 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm6[0],xmm0[1],xmm6[1]
4990 ; SSE2-NEXT: movq %xmm2, %rax
4991 ; SSE2-NEXT: testq %rax, %rax
4992 ; SSE2-NEXT: js .LBB85_19
4993 ; SSE2-NEXT: # %bb.20:
4994 ; SSE2-NEXT: xorps %xmm1, %xmm1
4995 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4996 ; SSE2-NEXT: jmp .LBB85_21
4997 ; SSE2-NEXT: .LBB85_19:
4998 ; SSE2-NEXT: movq %rax, %rcx
4999 ; SSE2-NEXT: shrq %rcx
5000 ; SSE2-NEXT: andl $1, %eax
5001 ; SSE2-NEXT: orq %rcx, %rax
5002 ; SSE2-NEXT: xorps %xmm1, %xmm1
5003 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
5004 ; SSE2-NEXT: addss %xmm1, %xmm1
5005 ; SSE2-NEXT: .LBB85_21:
5006 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm3[0]
5007 ; SSE2-NEXT: unpcklps {{.*#+}} xmm5 = xmm5[0],xmm7[0],xmm5[1],xmm7[1]
5008 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,0,1]
5009 ; SSE2-NEXT: movq %xmm2, %rax
5010 ; SSE2-NEXT: testq %rax, %rax
5011 ; SSE2-NEXT: js .LBB85_22
5012 ; SSE2-NEXT: # %bb.23:
5013 ; SSE2-NEXT: xorps %xmm2, %xmm2
5014 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
5015 ; SSE2-NEXT: jmp .LBB85_24
5016 ; SSE2-NEXT: .LBB85_22:
5017 ; SSE2-NEXT: movq %rax, %rcx
5018 ; SSE2-NEXT: shrq %rcx
5019 ; SSE2-NEXT: andl $1, %eax
5020 ; SSE2-NEXT: orq %rcx, %rax
5021 ; SSE2-NEXT: xorps %xmm2, %xmm2
5022 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
5023 ; SSE2-NEXT: addss %xmm2, %xmm2
5024 ; SSE2-NEXT: .LBB85_24:
5025 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
5026 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm5[0]
5029 ; SSE41-LABEL: uitofp_load_8i64_to_8f32:
5031 ; SSE41-NEXT: movdqa (%rdi), %xmm0
5032 ; SSE41-NEXT: movdqa 16(%rdi), %xmm4
5033 ; SSE41-NEXT: movdqa 32(%rdi), %xmm1
5034 ; SSE41-NEXT: movdqa 48(%rdi), %xmm2
5035 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
5036 ; SSE41-NEXT: testq %rax, %rax
5037 ; SSE41-NEXT: js .LBB85_1
5038 ; SSE41-NEXT: # %bb.2:
5039 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
5040 ; SSE41-NEXT: jmp .LBB85_3
5041 ; SSE41-NEXT: .LBB85_1:
5042 ; SSE41-NEXT: movq %rax, %rcx
5043 ; SSE41-NEXT: shrq %rcx
5044 ; SSE41-NEXT: andl $1, %eax
5045 ; SSE41-NEXT: orq %rcx, %rax
5046 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
5047 ; SSE41-NEXT: addss %xmm3, %xmm3
5048 ; SSE41-NEXT: .LBB85_3:
5049 ; SSE41-NEXT: movq %xmm0, %rax
5050 ; SSE41-NEXT: testq %rax, %rax
5051 ; SSE41-NEXT: js .LBB85_4
5052 ; SSE41-NEXT: # %bb.5:
5053 ; SSE41-NEXT: xorps %xmm0, %xmm0
5054 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
5055 ; SSE41-NEXT: jmp .LBB85_6
5056 ; SSE41-NEXT: .LBB85_4:
5057 ; SSE41-NEXT: movq %rax, %rcx
5058 ; SSE41-NEXT: shrq %rcx
5059 ; SSE41-NEXT: andl $1, %eax
5060 ; SSE41-NEXT: orq %rcx, %rax
5061 ; SSE41-NEXT: xorps %xmm0, %xmm0
5062 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
5063 ; SSE41-NEXT: addss %xmm0, %xmm0
5064 ; SSE41-NEXT: .LBB85_6:
5065 ; SSE41-NEXT: movq %xmm4, %rax
5066 ; SSE41-NEXT: testq %rax, %rax
5067 ; SSE41-NEXT: js .LBB85_7
5068 ; SSE41-NEXT: # %bb.8:
5069 ; SSE41-NEXT: cvtsi2ss %rax, %xmm5
5070 ; SSE41-NEXT: jmp .LBB85_9
5071 ; SSE41-NEXT: .LBB85_7:
5072 ; SSE41-NEXT: movq %rax, %rcx
5073 ; SSE41-NEXT: shrq %rcx
5074 ; SSE41-NEXT: andl $1, %eax
5075 ; SSE41-NEXT: orq %rcx, %rax
5076 ; SSE41-NEXT: cvtsi2ss %rax, %xmm5
5077 ; SSE41-NEXT: addss %xmm5, %xmm5
5078 ; SSE41-NEXT: .LBB85_9:
5079 ; SSE41-NEXT: pextrq $1, %xmm4, %rax
5080 ; SSE41-NEXT: testq %rax, %rax
5081 ; SSE41-NEXT: js .LBB85_10
5082 ; SSE41-NEXT: # %bb.11:
5083 ; SSE41-NEXT: xorps %xmm4, %xmm4
5084 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
5085 ; SSE41-NEXT: jmp .LBB85_12
5086 ; SSE41-NEXT: .LBB85_10:
5087 ; SSE41-NEXT: movq %rax, %rcx
5088 ; SSE41-NEXT: shrq %rcx
5089 ; SSE41-NEXT: andl $1, %eax
5090 ; SSE41-NEXT: orq %rcx, %rax
5091 ; SSE41-NEXT: xorps %xmm4, %xmm4
5092 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
5093 ; SSE41-NEXT: addss %xmm4, %xmm4
5094 ; SSE41-NEXT: .LBB85_12:
5095 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
5096 ; SSE41-NEXT: testq %rax, %rax
5097 ; SSE41-NEXT: js .LBB85_13
5098 ; SSE41-NEXT: # %bb.14:
5099 ; SSE41-NEXT: cvtsi2ss %rax, %xmm6
5100 ; SSE41-NEXT: jmp .LBB85_15
5101 ; SSE41-NEXT: .LBB85_13:
5102 ; SSE41-NEXT: movq %rax, %rcx
5103 ; SSE41-NEXT: shrq %rcx
5104 ; SSE41-NEXT: andl $1, %eax
5105 ; SSE41-NEXT: orq %rcx, %rax
5106 ; SSE41-NEXT: cvtsi2ss %rax, %xmm6
5107 ; SSE41-NEXT: addss %xmm6, %xmm6
5108 ; SSE41-NEXT: .LBB85_15:
5109 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
5110 ; SSE41-NEXT: movq %xmm1, %rax
5111 ; SSE41-NEXT: testq %rax, %rax
5112 ; SSE41-NEXT: js .LBB85_16
5113 ; SSE41-NEXT: # %bb.17:
5114 ; SSE41-NEXT: xorps %xmm1, %xmm1
5115 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
5116 ; SSE41-NEXT: jmp .LBB85_18
5117 ; SSE41-NEXT: .LBB85_16:
5118 ; SSE41-NEXT: movq %rax, %rcx
5119 ; SSE41-NEXT: shrq %rcx
5120 ; SSE41-NEXT: andl $1, %eax
5121 ; SSE41-NEXT: orq %rcx, %rax
5122 ; SSE41-NEXT: xorps %xmm1, %xmm1
5123 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
5124 ; SSE41-NEXT: addss %xmm1, %xmm1
5125 ; SSE41-NEXT: .LBB85_18:
5126 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0],xmm6[0],xmm1[2,3]
5127 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm5[0],xmm0[3]
5128 ; SSE41-NEXT: movq %xmm2, %rax
5129 ; SSE41-NEXT: testq %rax, %rax
5130 ; SSE41-NEXT: js .LBB85_19
5131 ; SSE41-NEXT: # %bb.20:
5132 ; SSE41-NEXT: xorps %xmm3, %xmm3
5133 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
5134 ; SSE41-NEXT: jmp .LBB85_21
5135 ; SSE41-NEXT: .LBB85_19:
5136 ; SSE41-NEXT: movq %rax, %rcx
5137 ; SSE41-NEXT: shrq %rcx
5138 ; SSE41-NEXT: andl $1, %eax
5139 ; SSE41-NEXT: orq %rcx, %rax
5140 ; SSE41-NEXT: xorps %xmm3, %xmm3
5141 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
5142 ; SSE41-NEXT: addss %xmm3, %xmm3
5143 ; SSE41-NEXT: .LBB85_21:
5144 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1],xmm3[0],xmm1[3]
5145 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm4[0]
5146 ; SSE41-NEXT: pextrq $1, %xmm2, %rax
5147 ; SSE41-NEXT: testq %rax, %rax
5148 ; SSE41-NEXT: js .LBB85_22
5149 ; SSE41-NEXT: # %bb.23:
5150 ; SSE41-NEXT: xorps %xmm2, %xmm2
5151 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
5152 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1,2],xmm2[0]
5154 ; SSE41-NEXT: .LBB85_22:
5155 ; SSE41-NEXT: movq %rax, %rcx
5156 ; SSE41-NEXT: shrq %rcx
5157 ; SSE41-NEXT: andl $1, %eax
5158 ; SSE41-NEXT: orq %rcx, %rax
5159 ; SSE41-NEXT: xorps %xmm2, %xmm2
5160 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
5161 ; SSE41-NEXT: addss %xmm2, %xmm2
5162 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1,2],xmm2[0]
5165 ; VEX-LABEL: uitofp_load_8i64_to_8f32:
5167 ; VEX-NEXT: vmovdqa (%rdi), %xmm1
5168 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm0
5169 ; VEX-NEXT: vmovdqa 32(%rdi), %xmm4
5170 ; VEX-NEXT: vmovdqa 48(%rdi), %xmm3
5171 ; VEX-NEXT: vpextrq $1, %xmm4, %rax
5172 ; VEX-NEXT: testq %rax, %rax
5173 ; VEX-NEXT: js .LBB85_1
5174 ; VEX-NEXT: # %bb.2:
5175 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
5176 ; VEX-NEXT: jmp .LBB85_3
5177 ; VEX-NEXT: .LBB85_1:
5178 ; VEX-NEXT: movq %rax, %rcx
5179 ; VEX-NEXT: shrq %rcx
5180 ; VEX-NEXT: andl $1, %eax
5181 ; VEX-NEXT: orq %rcx, %rax
5182 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
5183 ; VEX-NEXT: vaddss %xmm2, %xmm2, %xmm2
5184 ; VEX-NEXT: .LBB85_3:
5185 ; VEX-NEXT: vmovq %xmm4, %rax
5186 ; VEX-NEXT: testq %rax, %rax
5187 ; VEX-NEXT: js .LBB85_4
5188 ; VEX-NEXT: # %bb.5:
5189 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm5
5190 ; VEX-NEXT: jmp .LBB85_6
5191 ; VEX-NEXT: .LBB85_4:
5192 ; VEX-NEXT: movq %rax, %rcx
5193 ; VEX-NEXT: shrq %rcx
5194 ; VEX-NEXT: andl $1, %eax
5195 ; VEX-NEXT: orq %rcx, %rax
5196 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
5197 ; VEX-NEXT: vaddss %xmm4, %xmm4, %xmm5
5198 ; VEX-NEXT: .LBB85_6:
5199 ; VEX-NEXT: vmovq %xmm3, %rax
5200 ; VEX-NEXT: testq %rax, %rax
5201 ; VEX-NEXT: js .LBB85_7
5202 ; VEX-NEXT: # %bb.8:
5203 ; VEX-NEXT: vcvtsi2ss %rax, %xmm6, %xmm4
5204 ; VEX-NEXT: jmp .LBB85_9
5205 ; VEX-NEXT: .LBB85_7:
5206 ; VEX-NEXT: movq %rax, %rcx
5207 ; VEX-NEXT: shrq %rcx
5208 ; VEX-NEXT: andl $1, %eax
5209 ; VEX-NEXT: orq %rcx, %rax
5210 ; VEX-NEXT: vcvtsi2ss %rax, %xmm6, %xmm4
5211 ; VEX-NEXT: vaddss %xmm4, %xmm4, %xmm4
5212 ; VEX-NEXT: .LBB85_9:
5213 ; VEX-NEXT: vpextrq $1, %xmm3, %rax
5214 ; VEX-NEXT: testq %rax, %rax
5215 ; VEX-NEXT: js .LBB85_10
5216 ; VEX-NEXT: # %bb.11:
5217 ; VEX-NEXT: vcvtsi2ss %rax, %xmm6, %xmm3
5218 ; VEX-NEXT: jmp .LBB85_12
5219 ; VEX-NEXT: .LBB85_10:
5220 ; VEX-NEXT: movq %rax, %rcx
5221 ; VEX-NEXT: shrq %rcx
5222 ; VEX-NEXT: andl $1, %eax
5223 ; VEX-NEXT: orq %rcx, %rax
5224 ; VEX-NEXT: vcvtsi2ss %rax, %xmm6, %xmm3
5225 ; VEX-NEXT: vaddss %xmm3, %xmm3, %xmm3
5226 ; VEX-NEXT: .LBB85_12:
5227 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
5228 ; VEX-NEXT: testq %rax, %rax
5229 ; VEX-NEXT: js .LBB85_13
5230 ; VEX-NEXT: # %bb.14:
5231 ; VEX-NEXT: vcvtsi2ss %rax, %xmm6, %xmm6
5232 ; VEX-NEXT: jmp .LBB85_15
5233 ; VEX-NEXT: .LBB85_13:
5234 ; VEX-NEXT: movq %rax, %rcx
5235 ; VEX-NEXT: shrq %rcx
5236 ; VEX-NEXT: andl $1, %eax
5237 ; VEX-NEXT: orq %rcx, %rax
5238 ; VEX-NEXT: vcvtsi2ss %rax, %xmm6, %xmm6
5239 ; VEX-NEXT: vaddss %xmm6, %xmm6, %xmm6
5240 ; VEX-NEXT: .LBB85_15:
5241 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm5[0],xmm2[0],xmm5[2,3]
5242 ; VEX-NEXT: vmovq %xmm1, %rax
5243 ; VEX-NEXT: testq %rax, %rax
5244 ; VEX-NEXT: js .LBB85_16
5245 ; VEX-NEXT: # %bb.17:
5246 ; VEX-NEXT: vcvtsi2ss %rax, %xmm7, %xmm1
5247 ; VEX-NEXT: jmp .LBB85_18
5248 ; VEX-NEXT: .LBB85_16:
5249 ; VEX-NEXT: movq %rax, %rcx
5250 ; VEX-NEXT: shrq %rcx
5251 ; VEX-NEXT: andl $1, %eax
5252 ; VEX-NEXT: orq %rcx, %rax
5253 ; VEX-NEXT: vcvtsi2ss %rax, %xmm7, %xmm1
5254 ; VEX-NEXT: vaddss %xmm1, %xmm1, %xmm1
5255 ; VEX-NEXT: .LBB85_18:
5256 ; VEX-NEXT: vinsertps {{.*#+}} xmm5 = xmm1[0],xmm6[0],xmm1[2,3]
5257 ; VEX-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0,1],xmm4[0],xmm2[3]
5258 ; VEX-NEXT: vmovq %xmm0, %rax
5259 ; VEX-NEXT: testq %rax, %rax
5260 ; VEX-NEXT: js .LBB85_19
5261 ; VEX-NEXT: # %bb.20:
5262 ; VEX-NEXT: vcvtsi2ss %rax, %xmm7, %xmm2
5263 ; VEX-NEXT: jmp .LBB85_21
5264 ; VEX-NEXT: .LBB85_19:
5265 ; VEX-NEXT: movq %rax, %rcx
5266 ; VEX-NEXT: shrq %rcx
5267 ; VEX-NEXT: andl $1, %eax
5268 ; VEX-NEXT: orq %rcx, %rax
5269 ; VEX-NEXT: vcvtsi2ss %rax, %xmm7, %xmm2
5270 ; VEX-NEXT: vaddss %xmm2, %xmm2, %xmm2
5271 ; VEX-NEXT: .LBB85_21:
5272 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm5[0,1],xmm2[0],xmm5[3]
5273 ; VEX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1,2],xmm3[0]
5274 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
5275 ; VEX-NEXT: testq %rax, %rax
5276 ; VEX-NEXT: js .LBB85_22
5277 ; VEX-NEXT: # %bb.23:
5278 ; VEX-NEXT: vcvtsi2ss %rax, %xmm7, %xmm0
5279 ; VEX-NEXT: jmp .LBB85_24
5280 ; VEX-NEXT: .LBB85_22:
5281 ; VEX-NEXT: movq %rax, %rcx
5282 ; VEX-NEXT: shrq %rcx
5283 ; VEX-NEXT: andl $1, %eax
5284 ; VEX-NEXT: orq %rcx, %rax
5285 ; VEX-NEXT: vcvtsi2ss %rax, %xmm7, %xmm0
5286 ; VEX-NEXT: vaddss %xmm0, %xmm0, %xmm0
5287 ; VEX-NEXT: .LBB85_24:
5288 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm2[0,1,2],xmm0[0]
5289 ; VEX-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
5292 ; AVX512F-LABEL: uitofp_load_8i64_to_8f32:
5294 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
5295 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
5296 ; AVX512F-NEXT: vmovdqa 32(%rdi), %xmm2
5297 ; AVX512F-NEXT: vmovdqa 48(%rdi), %xmm3
5298 ; AVX512F-NEXT: vpextrq $1, %xmm2, %rax
5299 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm4, %xmm4
5300 ; AVX512F-NEXT: vmovq %xmm2, %rax
5301 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm2
5302 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
5303 ; AVX512F-NEXT: vmovq %xmm3, %rax
5304 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm4
5305 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
5306 ; AVX512F-NEXT: vpextrq $1, %xmm3, %rax
5307 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5308 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
5309 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
5310 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5311 ; AVX512F-NEXT: vmovq %xmm0, %rax
5312 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm0
5313 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
5314 ; AVX512F-NEXT: vmovq %xmm1, %rax
5315 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5316 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
5317 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
5318 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm1
5319 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
5320 ; AVX512F-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
5321 ; AVX512F-NEXT: retq
5323 ; AVX512VL-LABEL: uitofp_load_8i64_to_8f32:
5324 ; AVX512VL: # %bb.0:
5325 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
5326 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
5327 ; AVX512VL-NEXT: vmovdqa 32(%rdi), %xmm2
5328 ; AVX512VL-NEXT: vmovdqa 48(%rdi), %xmm3
5329 ; AVX512VL-NEXT: vpextrq $1, %xmm2, %rax
5330 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm4, %xmm4
5331 ; AVX512VL-NEXT: vmovq %xmm2, %rax
5332 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm2
5333 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
5334 ; AVX512VL-NEXT: vmovq %xmm3, %rax
5335 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm4
5336 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
5337 ; AVX512VL-NEXT: vpextrq $1, %xmm3, %rax
5338 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5339 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
5340 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
5341 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5342 ; AVX512VL-NEXT: vmovq %xmm0, %rax
5343 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm0
5344 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
5345 ; AVX512VL-NEXT: vmovq %xmm1, %rax
5346 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5347 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
5348 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
5349 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm1
5350 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
5351 ; AVX512VL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
5352 ; AVX512VL-NEXT: retq
5354 ; AVX512DQ-LABEL: uitofp_load_8i64_to_8f32:
5355 ; AVX512DQ: # %bb.0:
5356 ; AVX512DQ-NEXT: vcvtuqq2ps (%rdi), %ymm0
5357 ; AVX512DQ-NEXT: retq
5359 ; AVX512VLDQ-LABEL: uitofp_load_8i64_to_8f32:
5360 ; AVX512VLDQ: # %bb.0:
5361 ; AVX512VLDQ-NEXT: vcvtuqq2ps (%rdi), %ymm0
5362 ; AVX512VLDQ-NEXT: retq
5363 %ld = load <8 x i64>, <8 x i64> *%a
5364 %cvt = uitofp <8 x i64> %ld to <8 x float>
5365 ret <8 x float> %cvt
5368 define <8 x float> @uitofp_load_8i32_to_8f32(<8 x i32> *%a) {
5369 ; SSE2-LABEL: uitofp_load_8i32_to_8f32:
5371 ; SSE2-NEXT: movdqa (%rdi), %xmm0
5372 ; SSE2-NEXT: movdqa 16(%rdi), %xmm1
5373 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [65535,65535,65535,65535]
5374 ; SSE2-NEXT: movdqa %xmm0, %xmm3
5375 ; SSE2-NEXT: pand %xmm2, %xmm3
5376 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [1258291200,1258291200,1258291200,1258291200]
5377 ; SSE2-NEXT: por %xmm4, %xmm3
5378 ; SSE2-NEXT: psrld $16, %xmm0
5379 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [1392508928,1392508928,1392508928,1392508928]
5380 ; SSE2-NEXT: por %xmm5, %xmm0
5381 ; SSE2-NEXT: movaps {{.*#+}} xmm6 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
5382 ; SSE2-NEXT: addps %xmm6, %xmm0
5383 ; SSE2-NEXT: addps %xmm3, %xmm0
5384 ; SSE2-NEXT: pand %xmm1, %xmm2
5385 ; SSE2-NEXT: por %xmm4, %xmm2
5386 ; SSE2-NEXT: psrld $16, %xmm1
5387 ; SSE2-NEXT: por %xmm5, %xmm1
5388 ; SSE2-NEXT: addps %xmm6, %xmm1
5389 ; SSE2-NEXT: addps %xmm2, %xmm1
5392 ; SSE41-LABEL: uitofp_load_8i32_to_8f32:
5394 ; SSE41-NEXT: movdqa (%rdi), %xmm0
5395 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
5396 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [1258291200,1258291200,1258291200,1258291200]
5397 ; SSE41-NEXT: movdqa %xmm0, %xmm3
5398 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0],xmm2[1],xmm3[2],xmm2[3],xmm3[4],xmm2[5],xmm3[6],xmm2[7]
5399 ; SSE41-NEXT: psrld $16, %xmm0
5400 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [1392508928,1392508928,1392508928,1392508928]
5401 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm4[1],xmm0[2],xmm4[3],xmm0[4],xmm4[5],xmm0[6],xmm4[7]
5402 ; SSE41-NEXT: movaps {{.*#+}} xmm5 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
5403 ; SSE41-NEXT: addps %xmm5, %xmm0
5404 ; SSE41-NEXT: addps %xmm3, %xmm0
5405 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3],xmm1[4],xmm2[5],xmm1[6],xmm2[7]
5406 ; SSE41-NEXT: psrld $16, %xmm1
5407 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0],xmm4[1],xmm1[2],xmm4[3],xmm1[4],xmm4[5],xmm1[6],xmm4[7]
5408 ; SSE41-NEXT: addps %xmm5, %xmm1
5409 ; SSE41-NEXT: addps %xmm2, %xmm1
5412 ; AVX1-LABEL: uitofp_load_8i32_to_8f32:
5414 ; AVX1-NEXT: vmovaps (%rdi), %ymm0
5415 ; AVX1-NEXT: vmovdqa (%rdi), %xmm1
5416 ; AVX1-NEXT: vmovdqa 16(%rdi), %xmm2
5417 ; AVX1-NEXT: vpsrld $16, %xmm1, %xmm1
5418 ; AVX1-NEXT: vpsrld $16, %xmm2, %xmm2
5419 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm1, %ymm1
5420 ; AVX1-NEXT: vcvtdq2ps %ymm1, %ymm1
5421 ; AVX1-NEXT: vmulps {{.*}}(%rip), %ymm1, %ymm1
5422 ; AVX1-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
5423 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5424 ; AVX1-NEXT: vaddps %ymm0, %ymm1, %ymm0
5427 ; AVX2-LABEL: uitofp_load_8i32_to_8f32:
5429 ; AVX2-NEXT: vmovdqa (%rdi), %ymm0
5430 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200]
5431 ; AVX2-NEXT: vpblendw {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7],ymm0[8],ymm1[9],ymm0[10],ymm1[11],ymm0[12],ymm1[13],ymm0[14],ymm1[15]
5432 ; AVX2-NEXT: vpsrld $16, %ymm0, %ymm0
5433 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm2 = [1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928]
5434 ; AVX2-NEXT: vpblendw {{.*#+}} ymm0 = ymm0[0],ymm2[1],ymm0[2],ymm2[3],ymm0[4],ymm2[5],ymm0[6],ymm2[7],ymm0[8],ymm2[9],ymm0[10],ymm2[11],ymm0[12],ymm2[13],ymm0[14],ymm2[15]
5435 ; AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11,-5.49764202E+11]
5436 ; AVX2-NEXT: vaddps %ymm2, %ymm0, %ymm0
5437 ; AVX2-NEXT: vaddps %ymm0, %ymm1, %ymm0
5440 ; AVX512F-LABEL: uitofp_load_8i32_to_8f32:
5442 ; AVX512F-NEXT: vmovaps (%rdi), %ymm0
5443 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
5444 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
5445 ; AVX512F-NEXT: retq
5447 ; AVX512VL-LABEL: uitofp_load_8i32_to_8f32:
5448 ; AVX512VL: # %bb.0:
5449 ; AVX512VL-NEXT: vcvtudq2ps (%rdi), %ymm0
5450 ; AVX512VL-NEXT: retq
5452 ; AVX512DQ-LABEL: uitofp_load_8i32_to_8f32:
5453 ; AVX512DQ: # %bb.0:
5454 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
5455 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
5456 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
5457 ; AVX512DQ-NEXT: retq
5459 ; AVX512VLDQ-LABEL: uitofp_load_8i32_to_8f32:
5460 ; AVX512VLDQ: # %bb.0:
5461 ; AVX512VLDQ-NEXT: vcvtudq2ps (%rdi), %ymm0
5462 ; AVX512VLDQ-NEXT: retq
5463 %ld = load <8 x i32>, <8 x i32> *%a
5464 %cvt = uitofp <8 x i32> %ld to <8 x float>
5465 ret <8 x float> %cvt
5468 define <8 x float> @uitofp_load_8i16_to_8f32(<8 x i16> *%a) {
5469 ; SSE2-LABEL: uitofp_load_8i16_to_8f32:
5471 ; SSE2-NEXT: movdqa (%rdi), %xmm1
5472 ; SSE2-NEXT: pxor %xmm2, %xmm2
5473 ; SSE2-NEXT: movdqa %xmm1, %xmm0
5474 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
5475 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
5476 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
5477 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
5480 ; SSE41-LABEL: uitofp_load_8i16_to_8f32:
5482 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5483 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5484 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
5485 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
5488 ; AVX1-LABEL: uitofp_load_8i16_to_8f32:
5490 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5491 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5492 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5493 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5496 ; AVX2-LABEL: uitofp_load_8i16_to_8f32:
5498 ; AVX2-NEXT: vpmovzxwd {{.*#+}} ymm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
5499 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
5502 ; AVX512-LABEL: uitofp_load_8i16_to_8f32:
5504 ; AVX512-NEXT: vpmovzxwd {{.*#+}} ymm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
5505 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
5507 %ld = load <8 x i16>, <8 x i16> *%a
5508 %cvt = uitofp <8 x i16> %ld to <8 x float>
5509 ret <8 x float> %cvt
5512 define <8 x float> @uitofp_load_8i8_to_8f32(<8 x i8> *%a) {
5513 ; SSE2-LABEL: uitofp_load_8i8_to_8f32:
5515 ; SSE2-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
5516 ; SSE2-NEXT: pxor %xmm2, %xmm2
5517 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
5518 ; SSE2-NEXT: movdqa %xmm1, %xmm0
5519 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
5520 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
5521 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
5522 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
5525 ; SSE41-LABEL: uitofp_load_8i8_to_8f32:
5527 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5528 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5529 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
5530 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
5533 ; AVX1-LABEL: uitofp_load_8i8_to_8f32:
5535 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5536 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5537 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5538 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5541 ; AVX2-LABEL: uitofp_load_8i8_to_8f32:
5543 ; AVX2-NEXT: vpmovzxbd {{.*#+}} ymm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero,mem[4],zero,zero,zero,mem[5],zero,zero,zero,mem[6],zero,zero,zero,mem[7],zero,zero,zero
5544 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
5547 ; AVX512-LABEL: uitofp_load_8i8_to_8f32:
5549 ; AVX512-NEXT: vpmovzxbd {{.*#+}} ymm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero,mem[4],zero,zero,zero,mem[5],zero,zero,zero,mem[6],zero,zero,zero,mem[7],zero,zero,zero
5550 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
5552 %ld = load <8 x i8>, <8 x i8> *%a
5553 %cvt = uitofp <8 x i8> %ld to <8 x float>
5554 ret <8 x float> %cvt
5561 %Arguments = type <{ <8 x i8>, <8 x i16>, <8 x float>* }>
5562 define void @aggregate_sitofp_8i16_to_8f32(%Arguments* nocapture readonly %a0) {
5563 ; SSE2-LABEL: aggregate_sitofp_8i16_to_8f32:
5565 ; SSE2-NEXT: movq 24(%rdi), %rax
5566 ; SSE2-NEXT: movdqu 8(%rdi), %xmm0
5567 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
5568 ; SSE2-NEXT: psrad $16, %xmm1
5569 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
5570 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4,4,5,5,6,6,7,7]
5571 ; SSE2-NEXT: psrad $16, %xmm0
5572 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
5573 ; SSE2-NEXT: movaps %xmm0, 16(%rax)
5574 ; SSE2-NEXT: movaps %xmm1, (%rax)
5577 ; SSE41-LABEL: aggregate_sitofp_8i16_to_8f32:
5579 ; SSE41-NEXT: movq 24(%rdi), %rax
5580 ; SSE41-NEXT: movdqu 8(%rdi), %xmm0
5581 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
5582 ; SSE41-NEXT: pmovsxwd %xmm1, %xmm1
5583 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
5584 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
5585 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
5586 ; SSE41-NEXT: movaps %xmm0, (%rax)
5587 ; SSE41-NEXT: movaps %xmm1, 16(%rax)
5590 ; AVX1-LABEL: aggregate_sitofp_8i16_to_8f32:
5592 ; AVX1-NEXT: movq 24(%rdi), %rax
5593 ; AVX1-NEXT: vpmovsxwd 16(%rdi), %xmm0
5594 ; AVX1-NEXT: vpmovsxwd 8(%rdi), %xmm1
5595 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5596 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5597 ; AVX1-NEXT: vmovaps %ymm0, (%rax)
5598 ; AVX1-NEXT: vzeroupper
5601 ; AVX2-LABEL: aggregate_sitofp_8i16_to_8f32:
5603 ; AVX2-NEXT: movq 24(%rdi), %rax
5604 ; AVX2-NEXT: vpmovsxwd 8(%rdi), %ymm0
5605 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
5606 ; AVX2-NEXT: vmovaps %ymm0, (%rax)
5607 ; AVX2-NEXT: vzeroupper
5610 ; AVX512-LABEL: aggregate_sitofp_8i16_to_8f32:
5612 ; AVX512-NEXT: movq 24(%rdi), %rax
5613 ; AVX512-NEXT: vpmovsxwd 8(%rdi), %ymm0
5614 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
5615 ; AVX512-NEXT: vmovaps %ymm0, (%rax)
5616 ; AVX512-NEXT: vzeroupper
5618 %1 = load %Arguments, %Arguments* %a0, align 1
5619 %2 = extractvalue %Arguments %1, 1
5620 %3 = extractvalue %Arguments %1, 2
5621 %4 = sitofp <8 x i16> %2 to <8 x float>
5622 store <8 x float> %4, <8 x float>* %3, align 32
5626 define <2 x double> @sitofp_i32_to_2f64(<2 x double> %a0, i32 %a1) nounwind {
5627 ; SSE-LABEL: sitofp_i32_to_2f64:
5629 ; SSE-NEXT: cvtsi2sd %edi, %xmm0
5632 ; AVX-LABEL: sitofp_i32_to_2f64:
5634 ; AVX-NEXT: vcvtsi2sd %edi, %xmm0, %xmm0
5636 %cvt = sitofp i32 %a1 to double
5637 %res = insertelement <2 x double> %a0, double %cvt, i32 0
5638 ret <2 x double> %res
5641 define <4 x float> @sitofp_i32_to_4f32(<4 x float> %a0, i32 %a1) nounwind {
5642 ; SSE-LABEL: sitofp_i32_to_4f32:
5644 ; SSE-NEXT: cvtsi2ss %edi, %xmm0
5647 ; AVX-LABEL: sitofp_i32_to_4f32:
5649 ; AVX-NEXT: vcvtsi2ss %edi, %xmm0, %xmm0
5651 %cvt = sitofp i32 %a1 to float
5652 %res = insertelement <4 x float> %a0, float %cvt, i32 0
5653 ret <4 x float> %res
5656 define <2 x double> @sitofp_i64_to_2f64(<2 x double> %a0, i64 %a1) nounwind {
5657 ; SSE-LABEL: sitofp_i64_to_2f64:
5659 ; SSE-NEXT: cvtsi2sd %rdi, %xmm0
5662 ; AVX-LABEL: sitofp_i64_to_2f64:
5664 ; AVX-NEXT: vcvtsi2sd %rdi, %xmm0, %xmm0
5666 %cvt = sitofp i64 %a1 to double
5667 %res = insertelement <2 x double> %a0, double %cvt, i32 0
5668 ret <2 x double> %res
5671 define <4 x float> @sitofp_i64_to_4f32(<4 x float> %a0, i64 %a1) nounwind {
5672 ; SSE-LABEL: sitofp_i64_to_4f32:
5674 ; SSE-NEXT: cvtsi2ss %rdi, %xmm0
5677 ; AVX-LABEL: sitofp_i64_to_4f32:
5679 ; AVX-NEXT: vcvtsi2ss %rdi, %xmm0, %xmm0
5681 %cvt = sitofp i64 %a1 to float
5682 %res = insertelement <4 x float> %a0, float %cvt, i32 0
5683 ret <4 x float> %res
5686 ; Extract from int vector and convert to FP.
5688 define float @extract0_sitofp_v4i32_f32(<4 x i32> %x) nounwind {
5689 ; SSE-LABEL: extract0_sitofp_v4i32_f32:
5691 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
5694 ; AVX-LABEL: extract0_sitofp_v4i32_f32:
5696 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
5698 %e = extractelement <4 x i32> %x, i32 0
5699 %r = sitofp i32 %e to float
5703 define float @extract0_sitofp_v4i32_f32i_multiuse1(<4 x i32> %x) nounwind {
5704 ; SSE-LABEL: extract0_sitofp_v4i32_f32i_multiuse1:
5706 ; SSE-NEXT: movd %xmm0, %eax
5707 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
5708 ; SSE-NEXT: incl %eax
5709 ; SSE-NEXT: cvtsi2ss %eax, %xmm1
5710 ; SSE-NEXT: divss %xmm1, %xmm0
5713 ; AVX-LABEL: extract0_sitofp_v4i32_f32i_multiuse1:
5715 ; AVX-NEXT: vmovd %xmm0, %eax
5716 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
5717 ; AVX-NEXT: incl %eax
5718 ; AVX-NEXT: vcvtsi2ss %eax, %xmm1, %xmm1
5719 ; AVX-NEXT: vdivss %xmm1, %xmm0, %xmm0
5721 %e = extractelement <4 x i32> %x, i32 0
5722 %f = sitofp i32 %e to float
5724 %f1 = sitofp i32 %e1 to float
5725 %r = fdiv float %f, %f1
5729 define float @extract0_sitofp_v4i32_f32_multiuse2(<4 x i32> %x, i32* %p) nounwind {
5730 ; SSE-LABEL: extract0_sitofp_v4i32_f32_multiuse2:
5732 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm1
5733 ; SSE-NEXT: movss %xmm0, (%rdi)
5734 ; SSE-NEXT: movaps %xmm1, %xmm0
5737 ; AVX-LABEL: extract0_sitofp_v4i32_f32_multiuse2:
5739 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm1
5740 ; AVX-NEXT: vmovss %xmm0, (%rdi)
5741 ; AVX-NEXT: vmovaps %xmm1, %xmm0
5743 %e = extractelement <4 x i32> %x, i32 0
5744 %r = sitofp i32 %e to float
5745 store i32 %e, i32* %p
5749 define double @extract0_sitofp_v4i32_f64(<4 x i32> %x) nounwind {
5750 ; SSE-LABEL: extract0_sitofp_v4i32_f64:
5752 ; SSE-NEXT: movd %xmm0, %eax
5753 ; SSE-NEXT: xorps %xmm0, %xmm0
5754 ; SSE-NEXT: cvtsi2sd %eax, %xmm0
5757 ; AVX-LABEL: extract0_sitofp_v4i32_f64:
5759 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
5761 %e = extractelement <4 x i32> %x, i32 0
5762 %r = sitofp i32 %e to double
5766 define float @extract0_uitofp_v4i32_f32(<4 x i32> %x) nounwind {
5767 ; SSE-LABEL: extract0_uitofp_v4i32_f32:
5769 ; SSE-NEXT: movd %xmm0, %eax
5770 ; SSE-NEXT: xorps %xmm0, %xmm0
5771 ; SSE-NEXT: cvtsi2ss %rax, %xmm0
5774 ; VEX-LABEL: extract0_uitofp_v4i32_f32:
5776 ; VEX-NEXT: vmovd %xmm0, %eax
5777 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm0
5780 ; AVX512F-LABEL: extract0_uitofp_v4i32_f32:
5782 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
5783 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
5784 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5785 ; AVX512F-NEXT: vzeroupper
5786 ; AVX512F-NEXT: retq
5788 ; AVX512VL-LABEL: extract0_uitofp_v4i32_f32:
5789 ; AVX512VL: # %bb.0:
5790 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
5791 ; AVX512VL-NEXT: retq
5793 ; AVX512DQ-LABEL: extract0_uitofp_v4i32_f32:
5794 ; AVX512DQ: # %bb.0:
5795 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
5796 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
5797 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5798 ; AVX512DQ-NEXT: vzeroupper
5799 ; AVX512DQ-NEXT: retq
5801 ; AVX512VLDQ-LABEL: extract0_uitofp_v4i32_f32:
5802 ; AVX512VLDQ: # %bb.0:
5803 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
5804 ; AVX512VLDQ-NEXT: retq
5805 %e = extractelement <4 x i32> %x, i32 0
5806 %r = uitofp i32 %e to float
5810 define double @extract0_uitofp_v4i32_f64(<4 x i32> %x) nounwind {
5811 ; SSE-LABEL: extract0_uitofp_v4i32_f64:
5813 ; SSE-NEXT: movd %xmm0, %eax
5814 ; SSE-NEXT: xorps %xmm0, %xmm0
5815 ; SSE-NEXT: cvtsi2sd %rax, %xmm0
5818 ; VEX-LABEL: extract0_uitofp_v4i32_f64:
5820 ; VEX-NEXT: vmovd %xmm0, %eax
5821 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm0
5824 ; AVX512F-LABEL: extract0_uitofp_v4i32_f64:
5826 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
5827 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
5828 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5829 ; AVX512F-NEXT: vzeroupper
5830 ; AVX512F-NEXT: retq
5832 ; AVX512VL-LABEL: extract0_uitofp_v4i32_f64:
5833 ; AVX512VL: # %bb.0:
5834 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
5835 ; AVX512VL-NEXT: retq
5837 ; AVX512DQ-LABEL: extract0_uitofp_v4i32_f64:
5838 ; AVX512DQ: # %bb.0:
5839 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
5840 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
5841 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5842 ; AVX512DQ-NEXT: vzeroupper
5843 ; AVX512DQ-NEXT: retq
5845 ; AVX512VLDQ-LABEL: extract0_uitofp_v4i32_f64:
5846 ; AVX512VLDQ: # %bb.0:
5847 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
5848 ; AVX512VLDQ-NEXT: retq
5849 %e = extractelement <4 x i32> %x, i32 0
5850 %r = uitofp i32 %e to double
5854 ; Extract non-zero element from int vector and convert to FP.
5856 define float @extract3_sitofp_v4i32_f32(<4 x i32> %x) nounwind {
5857 ; SSE-LABEL: extract3_sitofp_v4i32_f32:
5859 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
5860 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
5863 ; AVX-LABEL: extract3_sitofp_v4i32_f32:
5865 ; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5866 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
5868 %e = extractelement <4 x i32> %x, i32 3
5869 %r = sitofp i32 %e to float
5873 define double @extract3_sitofp_v4i32_f64(<4 x i32> %x) nounwind {
5874 ; SSE2-LABEL: extract3_sitofp_v4i32_f64:
5876 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
5877 ; SSE2-NEXT: movd %xmm0, %eax
5878 ; SSE2-NEXT: xorps %xmm0, %xmm0
5879 ; SSE2-NEXT: cvtsi2sd %eax, %xmm0
5882 ; SSE41-LABEL: extract3_sitofp_v4i32_f64:
5884 ; SSE41-NEXT: extractps $3, %xmm0, %eax
5885 ; SSE41-NEXT: xorps %xmm0, %xmm0
5886 ; SSE41-NEXT: cvtsi2sd %eax, %xmm0
5889 ; AVX-LABEL: extract3_sitofp_v4i32_f64:
5891 ; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5892 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
5894 %e = extractelement <4 x i32> %x, i32 3
5895 %r = sitofp i32 %e to double
5899 define float @extract3_uitofp_v4i32_f32(<4 x i32> %x) nounwind {
5900 ; SSE2-LABEL: extract3_uitofp_v4i32_f32:
5902 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
5903 ; SSE2-NEXT: movd %xmm0, %eax
5904 ; SSE2-NEXT: xorps %xmm0, %xmm0
5905 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
5908 ; SSE41-LABEL: extract3_uitofp_v4i32_f32:
5910 ; SSE41-NEXT: extractps $3, %xmm0, %eax
5911 ; SSE41-NEXT: xorps %xmm0, %xmm0
5912 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
5915 ; VEX-LABEL: extract3_uitofp_v4i32_f32:
5917 ; VEX-NEXT: vextractps $3, %xmm0, %eax
5918 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm0
5921 ; AVX512F-LABEL: extract3_uitofp_v4i32_f32:
5923 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5924 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
5925 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5926 ; AVX512F-NEXT: vzeroupper
5927 ; AVX512F-NEXT: retq
5929 ; AVX512VL-LABEL: extract3_uitofp_v4i32_f32:
5930 ; AVX512VL: # %bb.0:
5931 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5932 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
5933 ; AVX512VL-NEXT: retq
5935 ; AVX512DQ-LABEL: extract3_uitofp_v4i32_f32:
5936 ; AVX512DQ: # %bb.0:
5937 ; AVX512DQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5938 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
5939 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5940 ; AVX512DQ-NEXT: vzeroupper
5941 ; AVX512DQ-NEXT: retq
5943 ; AVX512VLDQ-LABEL: extract3_uitofp_v4i32_f32:
5944 ; AVX512VLDQ: # %bb.0:
5945 ; AVX512VLDQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5946 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
5947 ; AVX512VLDQ-NEXT: retq
5948 %e = extractelement <4 x i32> %x, i32 3
5949 %r = uitofp i32 %e to float
5953 define double @extract3_uitofp_v4i32_f64(<4 x i32> %x) nounwind {
5954 ; SSE2-LABEL: extract3_uitofp_v4i32_f64:
5956 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,1,2,3]
5957 ; SSE2-NEXT: movd %xmm0, %eax
5958 ; SSE2-NEXT: xorps %xmm0, %xmm0
5959 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
5962 ; SSE41-LABEL: extract3_uitofp_v4i32_f64:
5964 ; SSE41-NEXT: extractps $3, %xmm0, %eax
5965 ; SSE41-NEXT: xorps %xmm0, %xmm0
5966 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
5969 ; VEX-LABEL: extract3_uitofp_v4i32_f64:
5971 ; VEX-NEXT: vextractps $3, %xmm0, %eax
5972 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm0
5975 ; AVX512F-LABEL: extract3_uitofp_v4i32_f64:
5977 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5978 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
5979 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5980 ; AVX512F-NEXT: vzeroupper
5981 ; AVX512F-NEXT: retq
5983 ; AVX512VL-LABEL: extract3_uitofp_v4i32_f64:
5984 ; AVX512VL: # %bb.0:
5985 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5986 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
5987 ; AVX512VL-NEXT: retq
5989 ; AVX512DQ-LABEL: extract3_uitofp_v4i32_f64:
5990 ; AVX512DQ: # %bb.0:
5991 ; AVX512DQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
5992 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
5993 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5994 ; AVX512DQ-NEXT: vzeroupper
5995 ; AVX512DQ-NEXT: retq
5997 ; AVX512VLDQ-LABEL: extract3_uitofp_v4i32_f64:
5998 ; AVX512VLDQ: # %bb.0:
5999 ; AVX512VLDQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
6000 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
6001 ; AVX512VLDQ-NEXT: retq
6002 %e = extractelement <4 x i32> %x, i32 3
6003 %r = uitofp i32 %e to double