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=SSE,SSE2
3 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=SSE,SSE41
4 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,VEX,AVX1
5 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,VEX,AVX2
6 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX,AVX512,AVX512F
7 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefixes=AVX,AVX512,AVX512VL
8 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512dq | FileCheck %s --check-prefixes=AVX,AVX512,AVX512DQ
9 ; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx512dq,+avx512vl | FileCheck %s --check-prefixes=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 float> @sitofp_2i32_to_2f32(<2 x i32> %a) {
22 ; SSE-LABEL: sitofp_2i32_to_2f32:
24 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
27 ; AVX-LABEL: sitofp_2i32_to_2f32:
29 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
31 %cvt = sitofp <2 x i32> %a to <2 x float>
35 define <2 x float> @uitofp_2i32_to_2f32(<2 x i32> %a) {
36 ; SSE2-LABEL: uitofp_2i32_to_2f32:
38 ; SSE2-NEXT: xorpd %xmm1, %xmm1
39 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
40 ; SSE2-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
41 ; SSE2-NEXT: orpd %xmm1, %xmm0
42 ; SSE2-NEXT: subpd %xmm1, %xmm0
43 ; SSE2-NEXT: cvtpd2ps %xmm0, %xmm0
46 ; SSE41-LABEL: uitofp_2i32_to_2f32:
48 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
49 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
50 ; SSE41-NEXT: por %xmm1, %xmm0
51 ; SSE41-NEXT: subpd %xmm1, %xmm0
52 ; SSE41-NEXT: cvtpd2ps %xmm0, %xmm0
55 ; VEX-LABEL: uitofp_2i32_to_2f32:
57 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
58 ; VEX-NEXT: vmovdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
59 ; VEX-NEXT: vpor %xmm1, %xmm0, %xmm0
60 ; VEX-NEXT: vsubpd %xmm1, %xmm0, %xmm0
61 ; VEX-NEXT: vcvtpd2ps %xmm0, %xmm0
64 ; AVX512F-LABEL: uitofp_2i32_to_2f32:
66 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
67 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
68 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
69 ; AVX512F-NEXT: vzeroupper
72 ; AVX512VL-LABEL: uitofp_2i32_to_2f32:
74 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
77 ; AVX512DQ-LABEL: uitofp_2i32_to_2f32:
79 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
80 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
81 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
82 ; AVX512DQ-NEXT: vzeroupper
85 ; AVX512VLDQ-LABEL: uitofp_2i32_to_2f32:
86 ; AVX512VLDQ: # %bb.0:
87 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
88 ; AVX512VLDQ-NEXT: retq
89 %cvt = uitofp <2 x i32> %a to <2 x float>
93 define <2 x double> @sitofp_2i64_to_2f64(<2 x i64> %a) {
94 ; SSE2-LABEL: sitofp_2i64_to_2f64:
96 ; SSE2-NEXT: movq %xmm0, %rax
97 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
98 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
99 ; SSE2-NEXT: movq %xmm0, %rax
100 ; SSE2-NEXT: xorps %xmm0, %xmm0
101 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
102 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm1 = xmm1[0],xmm0[0]
103 ; SSE2-NEXT: movapd %xmm1, %xmm0
106 ; SSE41-LABEL: sitofp_2i64_to_2f64:
108 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
109 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
110 ; SSE41-NEXT: movq %xmm0, %rax
111 ; SSE41-NEXT: xorps %xmm0, %xmm0
112 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
113 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
116 ; VEX-LABEL: sitofp_2i64_to_2f64:
118 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
119 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
120 ; VEX-NEXT: vmovq %xmm0, %rax
121 ; VEX-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
122 ; VEX-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
125 ; AVX512F-LABEL: sitofp_2i64_to_2f64:
127 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
128 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
129 ; AVX512F-NEXT: vmovq %xmm0, %rax
130 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
131 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
134 ; AVX512VL-LABEL: sitofp_2i64_to_2f64:
136 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
137 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
138 ; AVX512VL-NEXT: vmovq %xmm0, %rax
139 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
140 ; AVX512VL-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
141 ; AVX512VL-NEXT: retq
143 ; AVX512DQ-LABEL: sitofp_2i64_to_2f64:
145 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
146 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
147 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
148 ; AVX512DQ-NEXT: vzeroupper
149 ; AVX512DQ-NEXT: retq
151 ; AVX512VLDQ-LABEL: sitofp_2i64_to_2f64:
152 ; AVX512VLDQ: # %bb.0:
153 ; AVX512VLDQ-NEXT: vcvtqq2pd %xmm0, %xmm0
154 ; AVX512VLDQ-NEXT: retq
155 %cvt = sitofp <2 x i64> %a to <2 x double>
156 ret <2 x double> %cvt
159 define <2 x double> @sitofp_2i32_to_2f64(<4 x i32> %a) {
160 ; SSE-LABEL: sitofp_2i32_to_2f64:
162 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
165 ; AVX-LABEL: sitofp_2i32_to_2f64:
167 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
169 %shuf = shufflevector <4 x i32> %a, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
170 %cvt = sitofp <2 x i32> %shuf to <2 x double>
171 ret <2 x double> %cvt
174 define <2 x double> @sitofp_4i32_to_2f64(<4 x i32> %a) {
175 ; SSE-LABEL: sitofp_4i32_to_2f64:
177 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
180 ; AVX-LABEL: sitofp_4i32_to_2f64:
182 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
184 %cvt = sitofp <4 x i32> %a to <4 x double>
185 %shuf = shufflevector <4 x double> %cvt, <4 x double> undef, <2 x i32> <i32 0, i32 1>
186 ret <2 x double> %shuf
189 define <2 x double> @sitofp_2i16_to_2f64(<8 x i16> %a) {
190 ; SSE2-LABEL: sitofp_2i16_to_2f64:
192 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
193 ; SSE2-NEXT: psrad $16, %xmm0
194 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
197 ; SSE41-LABEL: sitofp_2i16_to_2f64:
199 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
200 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
203 ; AVX-LABEL: sitofp_2i16_to_2f64:
205 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
206 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
208 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <2 x i32> <i32 0, i32 1>
209 %cvt = sitofp <2 x i16> %shuf to <2 x double>
210 ret <2 x double> %cvt
213 define <2 x double> @sitofp_8i16_to_2f64(<8 x i16> %a) {
214 ; SSE2-LABEL: sitofp_8i16_to_2f64:
216 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
217 ; SSE2-NEXT: psrad $16, %xmm0
218 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
221 ; SSE41-LABEL: sitofp_8i16_to_2f64:
223 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
224 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
227 ; VEX-LABEL: sitofp_8i16_to_2f64:
229 ; VEX-NEXT: vpmovsxwd %xmm0, %xmm0
230 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
233 ; AVX512-LABEL: sitofp_8i16_to_2f64:
235 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
236 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
237 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
238 ; AVX512-NEXT: vzeroupper
240 %cvt = sitofp <8 x i16> %a to <8 x double>
241 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <2 x i32> <i32 0, i32 1>
242 ret <2 x double> %shuf
245 define <2 x double> @sitofp_2i8_to_2f64(<16 x i8> %a) {
246 ; SSE2-LABEL: sitofp_2i8_to_2f64:
248 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
249 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
250 ; SSE2-NEXT: psrad $24, %xmm0
251 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
254 ; SSE41-LABEL: sitofp_2i8_to_2f64:
256 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
257 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
260 ; AVX-LABEL: sitofp_2i8_to_2f64:
262 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
263 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
265 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <2 x i32> <i32 0, i32 1>
266 %cvt = sitofp <2 x i8> %shuf to <2 x double>
267 ret <2 x double> %cvt
270 define <2 x double> @sitofp_16i8_to_2f64(<16 x i8> %a) {
271 ; SSE2-LABEL: sitofp_16i8_to_2f64:
273 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
274 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
275 ; SSE2-NEXT: psrad $24, %xmm0
276 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
279 ; SSE41-LABEL: sitofp_16i8_to_2f64:
281 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
282 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
285 ; VEX-LABEL: sitofp_16i8_to_2f64:
287 ; VEX-NEXT: vpmovsxbd %xmm0, %xmm0
288 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
291 ; AVX512-LABEL: sitofp_16i8_to_2f64:
293 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
294 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
295 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
296 ; AVX512-NEXT: vzeroupper
298 %cvt = sitofp <16 x i8> %a to <16 x double>
299 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <2 x i32> <i32 0, i32 1>
300 ret <2 x double> %shuf
303 define <4 x double> @sitofp_4i64_to_4f64(<4 x i64> %a) {
304 ; SSE2-LABEL: sitofp_4i64_to_4f64:
306 ; SSE2-NEXT: movq %xmm0, %rax
307 ; SSE2-NEXT: cvtsi2sd %rax, %xmm2
308 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
309 ; SSE2-NEXT: movq %xmm0, %rax
310 ; SSE2-NEXT: xorps %xmm0, %xmm0
311 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
312 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm2 = xmm2[0],xmm0[0]
313 ; SSE2-NEXT: movq %xmm1, %rax
314 ; SSE2-NEXT: cvtsi2sd %rax, %xmm3
315 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,2,3]
316 ; SSE2-NEXT: movq %xmm0, %rax
317 ; SSE2-NEXT: xorps %xmm0, %xmm0
318 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
319 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm3 = xmm3[0],xmm0[0]
320 ; SSE2-NEXT: movapd %xmm2, %xmm0
321 ; SSE2-NEXT: movapd %xmm3, %xmm1
324 ; SSE41-LABEL: sitofp_4i64_to_4f64:
326 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
327 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
328 ; SSE41-NEXT: movq %xmm0, %rax
329 ; SSE41-NEXT: xorps %xmm0, %xmm0
330 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
331 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
332 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
333 ; SSE41-NEXT: xorps %xmm2, %xmm2
334 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
335 ; SSE41-NEXT: movq %xmm1, %rax
336 ; SSE41-NEXT: xorps %xmm1, %xmm1
337 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
338 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
341 ; AVX1-LABEL: sitofp_4i64_to_4f64:
343 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
344 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
345 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
346 ; AVX1-NEXT: vmovq %xmm1, %rax
347 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
348 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
349 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
350 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
351 ; AVX1-NEXT: vmovq %xmm0, %rax
352 ; AVX1-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
353 ; AVX1-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
354 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
357 ; AVX2-LABEL: sitofp_4i64_to_4f64:
359 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
360 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
361 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
362 ; AVX2-NEXT: vmovq %xmm1, %rax
363 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
364 ; AVX2-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
365 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
366 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
367 ; AVX2-NEXT: vmovq %xmm0, %rax
368 ; AVX2-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
369 ; AVX2-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
370 ; AVX2-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
373 ; AVX512F-LABEL: sitofp_4i64_to_4f64:
375 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm1
376 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
377 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
378 ; AVX512F-NEXT: vmovq %xmm1, %rax
379 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
380 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
381 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
382 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
383 ; AVX512F-NEXT: vmovq %xmm0, %rax
384 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
385 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
386 ; AVX512F-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
389 ; AVX512VL-LABEL: sitofp_4i64_to_4f64:
391 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm1
392 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
393 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
394 ; AVX512VL-NEXT: vmovq %xmm1, %rax
395 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
396 ; AVX512VL-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
397 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
398 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
399 ; AVX512VL-NEXT: vmovq %xmm0, %rax
400 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
401 ; AVX512VL-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
402 ; AVX512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
403 ; AVX512VL-NEXT: retq
405 ; AVX512DQ-LABEL: sitofp_4i64_to_4f64:
407 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
408 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
409 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
410 ; AVX512DQ-NEXT: retq
412 ; AVX512VLDQ-LABEL: sitofp_4i64_to_4f64:
413 ; AVX512VLDQ: # %bb.0:
414 ; AVX512VLDQ-NEXT: vcvtqq2pd %ymm0, %ymm0
415 ; AVX512VLDQ-NEXT: retq
416 %cvt = sitofp <4 x i64> %a to <4 x double>
417 ret <4 x double> %cvt
420 define <4 x double> @sitofp_4i32_to_4f64(<4 x i32> %a) {
421 ; SSE-LABEL: sitofp_4i32_to_4f64:
423 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm2
424 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
425 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm1
426 ; SSE-NEXT: movaps %xmm2, %xmm0
429 ; AVX-LABEL: sitofp_4i32_to_4f64:
431 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
433 %cvt = sitofp <4 x i32> %a to <4 x double>
434 ret <4 x double> %cvt
437 define <4 x double> @sitofp_4i16_to_4f64(<8 x i16> %a) {
438 ; SSE2-LABEL: sitofp_4i16_to_4f64:
440 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
441 ; SSE2-NEXT: psrad $16, %xmm1
442 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
443 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
444 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
447 ; SSE41-LABEL: sitofp_4i16_to_4f64:
449 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm1
450 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
451 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
452 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
455 ; AVX-LABEL: sitofp_4i16_to_4f64:
457 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
458 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
460 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
461 %cvt = sitofp <4 x i16> %shuf to <4 x double>
462 ret <4 x double> %cvt
465 define <4 x double> @sitofp_8i16_to_4f64(<8 x i16> %a) {
466 ; SSE2-LABEL: sitofp_8i16_to_4f64:
468 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
469 ; SSE2-NEXT: psrad $16, %xmm1
470 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
471 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
472 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
475 ; SSE41-LABEL: sitofp_8i16_to_4f64:
477 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm1
478 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
479 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
480 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
483 ; VEX-LABEL: sitofp_8i16_to_4f64:
485 ; VEX-NEXT: vpmovsxwd %xmm0, %xmm0
486 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
489 ; AVX512-LABEL: sitofp_8i16_to_4f64:
491 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
492 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
493 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
495 %cvt = sitofp <8 x i16> %a to <8 x double>
496 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
497 ret <4 x double> %shuf
500 define <4 x double> @sitofp_4i8_to_4f64(<16 x i8> %a) {
501 ; SSE2-LABEL: sitofp_4i8_to_4f64:
503 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
504 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
505 ; SSE2-NEXT: psrad $24, %xmm1
506 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
507 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
508 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
511 ; SSE41-LABEL: sitofp_4i8_to_4f64:
513 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
514 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
515 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
516 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
519 ; AVX-LABEL: sitofp_4i8_to_4f64:
521 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
522 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
524 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
525 %cvt = sitofp <4 x i8> %shuf to <4 x double>
526 ret <4 x double> %cvt
529 define <4 x double> @sitofp_16i8_to_4f64(<16 x i8> %a) {
530 ; SSE2-LABEL: sitofp_16i8_to_4f64:
532 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
533 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
534 ; SSE2-NEXT: psrad $24, %xmm1
535 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
536 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
537 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
540 ; SSE41-LABEL: sitofp_16i8_to_4f64:
542 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
543 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
544 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
545 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
548 ; VEX-LABEL: sitofp_16i8_to_4f64:
550 ; VEX-NEXT: vpmovsxbd %xmm0, %xmm0
551 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
554 ; AVX512-LABEL: sitofp_16i8_to_4f64:
556 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
557 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
558 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
560 %cvt = sitofp <16 x i8> %a to <16 x double>
561 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
562 ret <4 x double> %shuf
566 ; Unsigned Integer to Double
569 define <2 x double> @uitofp_2i64_to_2f64(<2 x i64> %a) {
570 ; SSE2-LABEL: uitofp_2i64_to_2f64:
572 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [4294967295,4294967295]
573 ; SSE2-NEXT: pand %xmm0, %xmm1
574 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
575 ; SSE2-NEXT: psrlq $32, %xmm0
576 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
577 ; SSE2-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
578 ; SSE2-NEXT: addpd %xmm1, %xmm0
581 ; SSE41-LABEL: uitofp_2i64_to_2f64:
583 ; SSE41-NEXT: pxor %xmm1, %xmm1
584 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
585 ; SSE41-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
586 ; SSE41-NEXT: psrlq $32, %xmm0
587 ; SSE41-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
588 ; SSE41-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
589 ; SSE41-NEXT: addpd %xmm1, %xmm0
592 ; AVX1-LABEL: uitofp_2i64_to_2f64:
594 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
595 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
596 ; AVX1-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
597 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm0
598 ; AVX1-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
599 ; AVX1-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
600 ; AVX1-NEXT: vaddpd %xmm0, %xmm1, %xmm0
603 ; AVX2-LABEL: uitofp_2i64_to_2f64:
605 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
606 ; AVX2-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
607 ; AVX2-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
608 ; AVX2-NEXT: vpsrlq $32, %xmm0, %xmm0
609 ; AVX2-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
610 ; AVX2-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
611 ; AVX2-NEXT: vaddpd %xmm0, %xmm1, %xmm0
614 ; AVX512F-LABEL: uitofp_2i64_to_2f64:
616 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
617 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
618 ; AVX512F-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
619 ; AVX512F-NEXT: vpsrlq $32, %xmm0, %xmm0
620 ; AVX512F-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
621 ; AVX512F-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
622 ; AVX512F-NEXT: vaddpd %xmm0, %xmm1, %xmm0
625 ; AVX512VL-LABEL: uitofp_2i64_to_2f64:
627 ; AVX512VL-NEXT: vpxor %xmm1, %xmm1, %xmm1
628 ; AVX512VL-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
629 ; AVX512VL-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
630 ; AVX512VL-NEXT: vpsrlq $32, %xmm0, %xmm0
631 ; AVX512VL-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
632 ; AVX512VL-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
633 ; AVX512VL-NEXT: vaddpd %xmm0, %xmm1, %xmm0
634 ; AVX512VL-NEXT: retq
636 ; AVX512DQ-LABEL: uitofp_2i64_to_2f64:
638 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
639 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
640 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
641 ; AVX512DQ-NEXT: vzeroupper
642 ; AVX512DQ-NEXT: retq
644 ; AVX512VLDQ-LABEL: uitofp_2i64_to_2f64:
645 ; AVX512VLDQ: # %bb.0:
646 ; AVX512VLDQ-NEXT: vcvtuqq2pd %xmm0, %xmm0
647 ; AVX512VLDQ-NEXT: retq
648 %cvt = uitofp <2 x i64> %a to <2 x double>
649 ret <2 x double> %cvt
652 define <2 x double> @uitofp_2i32_to_2f64(<4 x i32> %a) {
653 ; SSE2-LABEL: uitofp_2i32_to_2f64:
655 ; SSE2-NEXT: xorpd %xmm1, %xmm1
656 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
657 ; SSE2-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
658 ; SSE2-NEXT: orpd %xmm1, %xmm0
659 ; SSE2-NEXT: subpd %xmm1, %xmm0
662 ; SSE41-LABEL: uitofp_2i32_to_2f64:
664 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
665 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
666 ; SSE41-NEXT: por %xmm1, %xmm0
667 ; SSE41-NEXT: subpd %xmm1, %xmm0
670 ; VEX-LABEL: uitofp_2i32_to_2f64:
672 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
673 ; VEX-NEXT: vmovdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
674 ; VEX-NEXT: vpor %xmm1, %xmm0, %xmm0
675 ; VEX-NEXT: vsubpd %xmm1, %xmm0, %xmm0
678 ; AVX512F-LABEL: uitofp_2i32_to_2f64:
680 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
681 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
682 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
683 ; AVX512F-NEXT: vzeroupper
686 ; AVX512VL-LABEL: uitofp_2i32_to_2f64:
688 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
689 ; AVX512VL-NEXT: retq
691 ; AVX512DQ-LABEL: uitofp_2i32_to_2f64:
693 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
694 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
695 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
696 ; AVX512DQ-NEXT: vzeroupper
697 ; AVX512DQ-NEXT: retq
699 ; AVX512VLDQ-LABEL: uitofp_2i32_to_2f64:
700 ; AVX512VLDQ: # %bb.0:
701 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
702 ; AVX512VLDQ-NEXT: retq
703 %shuf = shufflevector <4 x i32> %a, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
704 %cvt = uitofp <2 x i32> %shuf to <2 x double>
705 ret <2 x double> %cvt
708 define <2 x double> @uitofp_4i32_to_2f64(<4 x i32> %a) {
709 ; SSE2-LABEL: uitofp_4i32_to_2f64:
711 ; SSE2-NEXT: xorpd %xmm1, %xmm1
712 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
713 ; SSE2-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
714 ; SSE2-NEXT: orpd %xmm1, %xmm0
715 ; SSE2-NEXT: subpd %xmm1, %xmm0
718 ; SSE41-LABEL: uitofp_4i32_to_2f64:
720 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
721 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
722 ; SSE41-NEXT: por %xmm1, %xmm0
723 ; SSE41-NEXT: subpd %xmm1, %xmm0
726 ; AVX1-LABEL: uitofp_4i32_to_2f64:
728 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
729 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
730 ; AVX1-NEXT: # xmm1 = mem[0,0]
731 ; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
732 ; AVX1-NEXT: vsubpd %xmm1, %xmm0, %xmm0
735 ; AVX2-LABEL: uitofp_4i32_to_2f64:
737 ; AVX2-NEXT: vpbroadcastq {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
738 ; AVX2-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
739 ; AVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
740 ; AVX2-NEXT: vsubpd %xmm1, %xmm0, %xmm0
743 ; AVX512F-LABEL: uitofp_4i32_to_2f64:
745 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
746 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
747 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
748 ; AVX512F-NEXT: vzeroupper
751 ; AVX512VL-LABEL: uitofp_4i32_to_2f64:
753 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
754 ; AVX512VL-NEXT: retq
756 ; AVX512DQ-LABEL: uitofp_4i32_to_2f64:
758 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
759 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
760 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
761 ; AVX512DQ-NEXT: vzeroupper
762 ; AVX512DQ-NEXT: retq
764 ; AVX512VLDQ-LABEL: uitofp_4i32_to_2f64:
765 ; AVX512VLDQ: # %bb.0:
766 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
767 ; AVX512VLDQ-NEXT: retq
768 %cvt = uitofp <4 x i32> %a to <4 x double>
769 %shuf = shufflevector <4 x double> %cvt, <4 x double> undef, <2 x i32> <i32 0, i32 1>
770 ret <2 x double> %shuf
773 define <2 x double> @uitofp_2i16_to_2f64(<8 x i16> %a) {
774 ; SSE2-LABEL: uitofp_2i16_to_2f64:
776 ; SSE2-NEXT: pxor %xmm1, %xmm1
777 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
778 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
781 ; SSE41-LABEL: uitofp_2i16_to_2f64:
783 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
784 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
787 ; AVX-LABEL: uitofp_2i16_to_2f64:
789 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
790 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
792 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <2 x i32> <i32 0, i32 1>
793 %cvt = uitofp <2 x i16> %shuf to <2 x double>
794 ret <2 x double> %cvt
797 define <2 x double> @uitofp_8i16_to_2f64(<8 x i16> %a) {
798 ; SSE2-LABEL: uitofp_8i16_to_2f64:
800 ; SSE2-NEXT: pxor %xmm1, %xmm1
801 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
802 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
805 ; SSE41-LABEL: uitofp_8i16_to_2f64:
807 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
808 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
811 ; VEX-LABEL: uitofp_8i16_to_2f64:
813 ; VEX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
814 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
817 ; AVX512-LABEL: uitofp_8i16_to_2f64:
819 ; 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
820 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
821 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
822 ; AVX512-NEXT: vzeroupper
824 %cvt = uitofp <8 x i16> %a to <8 x double>
825 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <2 x i32> <i32 0, i32 1>
826 ret <2 x double> %shuf
829 define <2 x double> @uitofp_2i8_to_2f64(<16 x i8> %a) {
830 ; SSE2-LABEL: uitofp_2i8_to_2f64:
832 ; SSE2-NEXT: pxor %xmm1, %xmm1
833 ; 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]
834 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
835 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
838 ; SSE41-LABEL: uitofp_2i8_to_2f64:
840 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
841 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
844 ; AVX-LABEL: uitofp_2i8_to_2f64:
846 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
847 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
849 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <2 x i32> <i32 0, i32 1>
850 %cvt = uitofp <2 x i8> %shuf to <2 x double>
851 ret <2 x double> %cvt
854 define <2 x double> @uitofp_16i8_to_2f64(<16 x i8> %a) {
855 ; SSE2-LABEL: uitofp_16i8_to_2f64:
857 ; SSE2-NEXT: pxor %xmm1, %xmm1
858 ; 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]
859 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
860 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
863 ; SSE41-LABEL: uitofp_16i8_to_2f64:
865 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
866 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
869 ; VEX-LABEL: uitofp_16i8_to_2f64:
871 ; VEX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
872 ; VEX-NEXT: vcvtdq2pd %xmm0, %xmm0
875 ; AVX512-LABEL: uitofp_16i8_to_2f64:
877 ; 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
878 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
879 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
880 ; AVX512-NEXT: vzeroupper
882 %cvt = uitofp <16 x i8> %a to <16 x double>
883 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <2 x i32> <i32 0, i32 1>
884 ret <2 x double> %shuf
887 define <4 x double> @uitofp_4i64_to_4f64(<4 x i64> %a) {
888 ; SSE2-LABEL: uitofp_4i64_to_4f64:
890 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [4294967295,4294967295]
891 ; SSE2-NEXT: movdqa %xmm0, %xmm3
892 ; SSE2-NEXT: pand %xmm2, %xmm3
893 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
894 ; SSE2-NEXT: por %xmm4, %xmm3
895 ; SSE2-NEXT: psrlq $32, %xmm0
896 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
897 ; SSE2-NEXT: por %xmm5, %xmm0
898 ; SSE2-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
899 ; SSE2-NEXT: subpd %xmm6, %xmm0
900 ; SSE2-NEXT: addpd %xmm3, %xmm0
901 ; SSE2-NEXT: pand %xmm1, %xmm2
902 ; SSE2-NEXT: por %xmm4, %xmm2
903 ; SSE2-NEXT: psrlq $32, %xmm1
904 ; SSE2-NEXT: por %xmm5, %xmm1
905 ; SSE2-NEXT: subpd %xmm6, %xmm1
906 ; SSE2-NEXT: addpd %xmm2, %xmm1
909 ; SSE41-LABEL: uitofp_4i64_to_4f64:
911 ; SSE41-NEXT: pxor %xmm2, %xmm2
912 ; SSE41-NEXT: movdqa %xmm0, %xmm3
913 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3],xmm3[4,5],xmm2[6,7]
914 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
915 ; SSE41-NEXT: por %xmm4, %xmm3
916 ; SSE41-NEXT: psrlq $32, %xmm0
917 ; SSE41-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
918 ; SSE41-NEXT: por %xmm5, %xmm0
919 ; SSE41-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
920 ; SSE41-NEXT: subpd %xmm6, %xmm0
921 ; SSE41-NEXT: addpd %xmm3, %xmm0
922 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
923 ; SSE41-NEXT: por %xmm4, %xmm2
924 ; SSE41-NEXT: psrlq $32, %xmm1
925 ; SSE41-NEXT: por %xmm5, %xmm1
926 ; SSE41-NEXT: subpd %xmm6, %xmm1
927 ; SSE41-NEXT: addpd %xmm2, %xmm1
930 ; AVX1-LABEL: uitofp_4i64_to_4f64:
932 ; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
933 ; AVX1-NEXT: vblendps {{.*#+}} ymm2 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
934 ; AVX1-NEXT: vorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm2
935 ; AVX1-NEXT: vshufps {{.*#+}} ymm0 = ymm0[1,3],ymm1[1,3],ymm0[5,7],ymm1[5,7]
936 ; AVX1-NEXT: vpermilps {{.*#+}} ymm0 = ymm0[0,2,1,3,4,6,5,7]
937 ; AVX1-NEXT: vorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
938 ; AVX1-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
939 ; AVX1-NEXT: vaddpd %ymm0, %ymm2, %ymm0
942 ; AVX2-LABEL: uitofp_4i64_to_4f64:
944 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
945 ; AVX2-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
946 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
947 ; AVX2-NEXT: vpor %ymm2, %ymm1, %ymm1
948 ; AVX2-NEXT: vpsrlq $32, %ymm0, %ymm0
949 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
950 ; AVX2-NEXT: vpor %ymm2, %ymm0, %ymm0
951 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
952 ; AVX2-NEXT: vsubpd %ymm2, %ymm0, %ymm0
953 ; AVX2-NEXT: vaddpd %ymm0, %ymm1, %ymm0
956 ; AVX512F-LABEL: uitofp_4i64_to_4f64:
958 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
959 ; AVX512F-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
960 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
961 ; AVX512F-NEXT: vpor %ymm2, %ymm1, %ymm1
962 ; AVX512F-NEXT: vpsrlq $32, %ymm0, %ymm0
963 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
964 ; AVX512F-NEXT: vpor %ymm2, %ymm0, %ymm0
965 ; AVX512F-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
966 ; AVX512F-NEXT: vsubpd %ymm2, %ymm0, %ymm0
967 ; AVX512F-NEXT: vaddpd %ymm0, %ymm1, %ymm0
970 ; AVX512VL-LABEL: uitofp_4i64_to_4f64:
972 ; AVX512VL-NEXT: vpxor %xmm1, %xmm1, %xmm1
973 ; AVX512VL-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
974 ; AVX512VL-NEXT: vporq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm1, %ymm1
975 ; AVX512VL-NEXT: vpsrlq $32, %ymm0, %ymm0
976 ; AVX512VL-NEXT: vporq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %ymm0
977 ; AVX512VL-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %ymm0
978 ; AVX512VL-NEXT: vaddpd %ymm0, %ymm1, %ymm0
979 ; AVX512VL-NEXT: retq
981 ; AVX512DQ-LABEL: uitofp_4i64_to_4f64:
983 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
984 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
985 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
986 ; AVX512DQ-NEXT: retq
988 ; AVX512VLDQ-LABEL: uitofp_4i64_to_4f64:
989 ; AVX512VLDQ: # %bb.0:
990 ; AVX512VLDQ-NEXT: vcvtuqq2pd %ymm0, %ymm0
991 ; AVX512VLDQ-NEXT: retq
992 %cvt = uitofp <4 x i64> %a to <4 x double>
993 ret <4 x double> %cvt
996 define <4 x double> @uitofp_4i32_to_4f64(<4 x i32> %a) {
997 ; SSE2-LABEL: uitofp_4i32_to_4f64:
999 ; SSE2-NEXT: movapd %xmm0, %xmm1
1000 ; SSE2-NEXT: xorpd %xmm2, %xmm2
1001 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
1002 ; SSE2-NEXT: movapd {{.*#+}} xmm3 = [4.503599627370496E+15,4.503599627370496E+15]
1003 ; SSE2-NEXT: orpd %xmm3, %xmm0
1004 ; SSE2-NEXT: subpd %xmm3, %xmm0
1005 ; SSE2-NEXT: unpckhps {{.*#+}} xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3]
1006 ; SSE2-NEXT: orpd %xmm3, %xmm1
1007 ; SSE2-NEXT: subpd %xmm3, %xmm1
1010 ; SSE41-LABEL: uitofp_4i32_to_4f64:
1012 ; SSE41-NEXT: movdqa %xmm0, %xmm1
1013 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
1014 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [4.503599627370496E+15,4.503599627370496E+15]
1015 ; SSE41-NEXT: por %xmm2, %xmm0
1016 ; SSE41-NEXT: subpd %xmm2, %xmm0
1017 ; SSE41-NEXT: pxor %xmm3, %xmm3
1018 ; SSE41-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm3[2],xmm1[3],xmm3[3]
1019 ; SSE41-NEXT: por %xmm2, %xmm1
1020 ; SSE41-NEXT: subpd %xmm2, %xmm1
1023 ; AVX1-LABEL: uitofp_4i32_to_4f64:
1025 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
1026 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1027 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
1028 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1029 ; AVX1-NEXT: vbroadcastsd {{.*#+}} ymm1 = [4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15]
1030 ; AVX1-NEXT: vorpd %ymm1, %ymm0, %ymm0
1031 ; AVX1-NEXT: vsubpd %ymm1, %ymm0, %ymm0
1034 ; AVX2-LABEL: uitofp_4i32_to_4f64:
1036 ; AVX2-NEXT: vpmovzxdq {{.*#+}} ymm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1037 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15]
1038 ; AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
1039 ; AVX2-NEXT: vsubpd %ymm1, %ymm0, %ymm0
1042 ; AVX512F-LABEL: uitofp_4i32_to_4f64:
1044 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1045 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
1046 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1047 ; AVX512F-NEXT: retq
1049 ; AVX512VL-LABEL: uitofp_4i32_to_4f64:
1050 ; AVX512VL: # %bb.0:
1051 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %ymm0
1052 ; AVX512VL-NEXT: retq
1054 ; AVX512DQ-LABEL: uitofp_4i32_to_4f64:
1055 ; AVX512DQ: # %bb.0:
1056 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1057 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
1058 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1059 ; AVX512DQ-NEXT: retq
1061 ; AVX512VLDQ-LABEL: uitofp_4i32_to_4f64:
1062 ; AVX512VLDQ: # %bb.0:
1063 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %ymm0
1064 ; AVX512VLDQ-NEXT: retq
1065 %cvt = uitofp <4 x i32> %a to <4 x double>
1066 ret <4 x double> %cvt
1069 define <4 x double> @uitofp_4i16_to_4f64(<8 x i16> %a) {
1070 ; SSE2-LABEL: uitofp_4i16_to_4f64:
1072 ; SSE2-NEXT: pxor %xmm1, %xmm1
1073 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1074 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1075 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1076 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1077 ; SSE2-NEXT: movaps %xmm2, %xmm0
1080 ; SSE41-LABEL: uitofp_4i16_to_4f64:
1082 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1083 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1084 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
1085 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1088 ; AVX-LABEL: uitofp_4i16_to_4f64:
1090 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1091 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
1093 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1094 %cvt = uitofp <4 x i16> %shuf to <4 x double>
1095 ret <4 x double> %cvt
1098 define <4 x double> @uitofp_8i16_to_4f64(<8 x i16> %a) {
1099 ; SSE2-LABEL: uitofp_8i16_to_4f64:
1101 ; SSE2-NEXT: pxor %xmm1, %xmm1
1102 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1103 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1104 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1105 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1106 ; SSE2-NEXT: movaps %xmm2, %xmm0
1109 ; SSE41-LABEL: uitofp_8i16_to_4f64:
1111 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1112 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1113 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
1114 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1117 ; VEX-LABEL: uitofp_8i16_to_4f64:
1119 ; VEX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
1120 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
1123 ; AVX512-LABEL: uitofp_8i16_to_4f64:
1125 ; 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
1126 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
1127 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1129 %cvt = uitofp <8 x i16> %a to <8 x double>
1130 %shuf = shufflevector <8 x double> %cvt, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1131 ret <4 x double> %shuf
1134 define <4 x double> @uitofp_4i8_to_4f64(<16 x i8> %a) {
1135 ; SSE2-LABEL: uitofp_4i8_to_4f64:
1137 ; SSE2-NEXT: pxor %xmm1, %xmm1
1138 ; 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]
1139 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1140 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1141 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1142 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1143 ; SSE2-NEXT: movaps %xmm2, %xmm0
1146 ; SSE41-LABEL: uitofp_4i8_to_4f64:
1148 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1149 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1150 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
1151 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1154 ; AVX-LABEL: uitofp_4i8_to_4f64:
1156 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1157 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
1159 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1160 %cvt = uitofp <4 x i8> %shuf to <4 x double>
1161 ret <4 x double> %cvt
1164 define <4 x double> @uitofp_16i8_to_4f64(<16 x i8> %a) {
1165 ; SSE2-LABEL: uitofp_16i8_to_4f64:
1167 ; SSE2-NEXT: pxor %xmm1, %xmm1
1168 ; 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]
1169 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1170 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm2
1171 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1172 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm1
1173 ; SSE2-NEXT: movaps %xmm2, %xmm0
1176 ; SSE41-LABEL: uitofp_16i8_to_4f64:
1178 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1179 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
1180 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
1181 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
1184 ; VEX-LABEL: uitofp_16i8_to_4f64:
1186 ; VEX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
1187 ; VEX-NEXT: vcvtdq2pd %xmm0, %ymm0
1190 ; AVX512-LABEL: uitofp_16i8_to_4f64:
1192 ; 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
1193 ; AVX512-NEXT: vcvtdq2pd %ymm0, %zmm0
1194 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1196 %cvt = uitofp <16 x i8> %a to <16 x double>
1197 %shuf = shufflevector <16 x double> %cvt, <16 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1198 ret <4 x double> %shuf
1202 ; Signed Integer to Float
1205 define <4 x float> @sitofp_2i64_to_4f32(<2 x i64> %a) {
1206 ; SSE2-LABEL: sitofp_2i64_to_4f32:
1208 ; SSE2-NEXT: movq %xmm0, %rax
1209 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1210 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1211 ; SSE2-NEXT: movq %xmm0, %rax
1212 ; SSE2-NEXT: xorps %xmm0, %xmm0
1213 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1214 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1215 ; SSE2-NEXT: movaps %xmm1, %xmm0
1218 ; SSE41-LABEL: sitofp_2i64_to_4f32:
1220 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1221 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1222 ; SSE41-NEXT: movq %xmm0, %rax
1223 ; SSE41-NEXT: xorps %xmm0, %xmm0
1224 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1225 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
1228 ; VEX-LABEL: sitofp_2i64_to_4f32:
1230 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1231 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1232 ; VEX-NEXT: vmovq %xmm0, %rax
1233 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1234 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1237 ; AVX512F-LABEL: sitofp_2i64_to_4f32:
1239 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1240 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1241 ; AVX512F-NEXT: vmovq %xmm0, %rax
1242 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1243 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1244 ; AVX512F-NEXT: retq
1246 ; AVX512VL-LABEL: sitofp_2i64_to_4f32:
1247 ; AVX512VL: # %bb.0:
1248 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1249 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1250 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1251 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1252 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1253 ; AVX512VL-NEXT: retq
1255 ; AVX512DQ-LABEL: sitofp_2i64_to_4f32:
1256 ; AVX512DQ: # %bb.0:
1257 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1258 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1259 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1260 ; AVX512DQ-NEXT: vzeroupper
1261 ; AVX512DQ-NEXT: retq
1263 ; AVX512VLDQ-LABEL: sitofp_2i64_to_4f32:
1264 ; AVX512VLDQ: # %bb.0:
1265 ; AVX512VLDQ-NEXT: vcvtqq2ps %xmm0, %xmm0
1266 ; AVX512VLDQ-NEXT: retq
1267 %cvt = sitofp <2 x i64> %a to <2 x float>
1268 %ext = shufflevector <2 x float> %cvt, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1269 ret <4 x float> %ext
1272 define <4 x float> @sitofp_2i64_to_4f32_zero(<2 x i64> %a) {
1273 ; SSE2-LABEL: sitofp_2i64_to_4f32_zero:
1275 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,2,3]
1276 ; SSE2-NEXT: movq %xmm1, %rax
1277 ; SSE2-NEXT: xorps %xmm1, %xmm1
1278 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1279 ; SSE2-NEXT: movq %xmm0, %rax
1280 ; SSE2-NEXT: xorps %xmm0, %xmm0
1281 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1282 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1283 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
1286 ; SSE41-LABEL: sitofp_2i64_to_4f32_zero:
1288 ; SSE41-NEXT: movq %xmm0, %rax
1289 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1290 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1291 ; SSE41-NEXT: xorps %xmm0, %xmm0
1292 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1293 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0],xmm0[0],zero,zero
1294 ; SSE41-NEXT: movaps %xmm1, %xmm0
1297 ; VEX-LABEL: sitofp_2i64_to_4f32_zero:
1299 ; VEX-NEXT: vmovq %xmm0, %rax
1300 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1301 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1302 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1303 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
1306 ; AVX512F-LABEL: sitofp_2i64_to_4f32_zero:
1308 ; AVX512F-NEXT: vmovq %xmm0, %rax
1309 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1310 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1311 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1312 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
1313 ; AVX512F-NEXT: retq
1315 ; AVX512VL-LABEL: sitofp_2i64_to_4f32_zero:
1316 ; AVX512VL: # %bb.0:
1317 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1318 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1319 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1320 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1321 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
1322 ; AVX512VL-NEXT: retq
1324 ; AVX512DQ-LABEL: sitofp_2i64_to_4f32_zero:
1325 ; AVX512DQ: # %bb.0:
1326 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1327 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1328 ; AVX512DQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1329 ; AVX512DQ-NEXT: vzeroupper
1330 ; AVX512DQ-NEXT: retq
1332 ; AVX512VLDQ-LABEL: sitofp_2i64_to_4f32_zero:
1333 ; AVX512VLDQ: # %bb.0:
1334 ; AVX512VLDQ-NEXT: vcvtqq2ps %xmm0, %xmm0
1335 ; AVX512VLDQ-NEXT: retq
1336 %cvt = sitofp <2 x i64> %a to <2 x float>
1337 %ext = shufflevector <2 x float> %cvt, <2 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1338 ret <4 x float> %ext
1341 define <4 x float> @sitofp_4i64_to_4f32_undef(<2 x i64> %a) {
1342 ; SSE2-LABEL: sitofp_4i64_to_4f32_undef:
1344 ; SSE2-NEXT: movq %xmm0, %rax
1345 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1346 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1347 ; SSE2-NEXT: movq %xmm0, %rax
1348 ; SSE2-NEXT: xorps %xmm0, %xmm0
1349 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1350 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1351 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm1[0],zero
1354 ; SSE41-LABEL: sitofp_4i64_to_4f32_undef:
1356 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1357 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1358 ; SSE41-NEXT: movq %xmm0, %rax
1359 ; SSE41-NEXT: xorps %xmm0, %xmm0
1360 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1361 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1364 ; VEX-LABEL: sitofp_4i64_to_4f32_undef:
1366 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
1367 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1368 ; VEX-NEXT: vmovq %xmm0, %rax
1369 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1370 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1373 ; AVX512F-LABEL: sitofp_4i64_to_4f32_undef:
1375 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1376 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1377 ; AVX512F-NEXT: vmovq %xmm0, %rax
1378 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1379 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1380 ; AVX512F-NEXT: retq
1382 ; AVX512VL-LABEL: sitofp_4i64_to_4f32_undef:
1383 ; AVX512VL: # %bb.0:
1384 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1385 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1386 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1387 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm0
1388 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1389 ; AVX512VL-NEXT: retq
1391 ; AVX512DQ-LABEL: sitofp_4i64_to_4f32_undef:
1392 ; AVX512DQ: # %bb.0:
1393 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1394 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1395 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1396 ; AVX512DQ-NEXT: vzeroupper
1397 ; AVX512DQ-NEXT: retq
1399 ; AVX512VLDQ-LABEL: sitofp_4i64_to_4f32_undef:
1400 ; AVX512VLDQ: # %bb.0:
1401 ; AVX512VLDQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1402 ; AVX512VLDQ-NEXT: vcvtqq2ps %ymm0, %xmm0
1403 ; AVX512VLDQ-NEXT: vzeroupper
1404 ; AVX512VLDQ-NEXT: retq
1405 %ext = shufflevector <2 x i64> %a, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1406 %cvt = sitofp <4 x i64> %ext to <4 x float>
1407 ret <4 x float> %cvt
1410 define <4 x float> @sitofp_4i32_to_4f32(<4 x i32> %a) {
1411 ; SSE-LABEL: sitofp_4i32_to_4f32:
1413 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
1416 ; AVX-LABEL: sitofp_4i32_to_4f32:
1418 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
1420 %cvt = sitofp <4 x i32> %a to <4 x float>
1421 ret <4 x float> %cvt
1424 define <4 x float> @sitofp_4i16_to_4f32(<8 x i16> %a) {
1425 ; SSE2-LABEL: sitofp_4i16_to_4f32:
1427 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1428 ; SSE2-NEXT: psrad $16, %xmm0
1429 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1432 ; SSE41-LABEL: sitofp_4i16_to_4f32:
1434 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
1435 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1438 ; AVX-LABEL: sitofp_4i16_to_4f32:
1440 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
1441 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
1443 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1444 %cvt = sitofp <4 x i16> %shuf to <4 x float>
1445 ret <4 x float> %cvt
1448 define <4 x float> @sitofp_8i16_to_4f32(<8 x i16> %a) {
1449 ; SSE2-LABEL: sitofp_8i16_to_4f32:
1451 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1452 ; SSE2-NEXT: psrad $16, %xmm0
1453 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1456 ; SSE41-LABEL: sitofp_8i16_to_4f32:
1458 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
1459 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1462 ; AVX1-LABEL: sitofp_8i16_to_4f32:
1464 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm1
1465 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1466 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm0
1467 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1468 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1469 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1470 ; AVX1-NEXT: vzeroupper
1473 ; AVX2-LABEL: sitofp_8i16_to_4f32:
1475 ; AVX2-NEXT: vpmovsxwd %xmm0, %ymm0
1476 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1477 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1478 ; AVX2-NEXT: vzeroupper
1481 ; AVX512-LABEL: sitofp_8i16_to_4f32:
1483 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
1484 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
1485 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1486 ; AVX512-NEXT: vzeroupper
1488 %cvt = sitofp <8 x i16> %a to <8 x float>
1489 %shuf = shufflevector <8 x float> %cvt, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1490 ret <4 x float> %shuf
1493 define <4 x float> @sitofp_4i8_to_4f32(<16 x i8> %a) {
1494 ; SSE2-LABEL: sitofp_4i8_to_4f32:
1496 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
1497 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1498 ; SSE2-NEXT: psrad $24, %xmm0
1499 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1502 ; SSE41-LABEL: sitofp_4i8_to_4f32:
1504 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1505 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1508 ; AVX-LABEL: sitofp_4i8_to_4f32:
1510 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
1511 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
1513 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1514 %cvt = sitofp <4 x i8> %shuf to <4 x float>
1515 ret <4 x float> %cvt
1518 define <4 x float> @sitofp_16i8_to_4f32(<16 x i8> %a) {
1519 ; SSE2-LABEL: sitofp_16i8_to_4f32:
1521 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
1522 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
1523 ; SSE2-NEXT: psrad $24, %xmm0
1524 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1527 ; SSE41-LABEL: sitofp_16i8_to_4f32:
1529 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1530 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
1533 ; AVX1-LABEL: sitofp_16i8_to_4f32:
1535 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm1
1536 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
1537 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm0
1538 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1539 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1540 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1541 ; AVX1-NEXT: vzeroupper
1544 ; AVX2-LABEL: sitofp_16i8_to_4f32:
1546 ; AVX2-NEXT: vpmovsxbd %xmm0, %ymm0
1547 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1548 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1549 ; AVX2-NEXT: vzeroupper
1552 ; AVX512-LABEL: sitofp_16i8_to_4f32:
1554 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
1555 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
1556 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1557 ; AVX512-NEXT: vzeroupper
1559 %cvt = sitofp <16 x i8> %a to <16 x float>
1560 %shuf = shufflevector <16 x float> %cvt, <16 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1561 ret <4 x float> %shuf
1564 define <4 x float> @sitofp_4i64_to_4f32(<4 x i64> %a) {
1565 ; SSE2-LABEL: sitofp_4i64_to_4f32:
1567 ; SSE2-NEXT: movq %xmm1, %rax
1568 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
1569 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
1570 ; SSE2-NEXT: movq %xmm1, %rax
1571 ; SSE2-NEXT: xorps %xmm1, %xmm1
1572 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1573 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
1574 ; SSE2-NEXT: movq %xmm0, %rax
1575 ; SSE2-NEXT: xorps %xmm1, %xmm1
1576 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1577 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1578 ; SSE2-NEXT: movq %xmm0, %rax
1579 ; SSE2-NEXT: xorps %xmm0, %xmm0
1580 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1581 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
1582 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
1583 ; SSE2-NEXT: movaps %xmm1, %xmm0
1586 ; SSE41-LABEL: sitofp_4i64_to_4f32:
1588 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1589 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
1590 ; SSE41-NEXT: movq %xmm0, %rax
1591 ; SSE41-NEXT: xorps %xmm0, %xmm0
1592 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
1593 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
1594 ; SSE41-NEXT: movq %xmm1, %rax
1595 ; SSE41-NEXT: xorps %xmm2, %xmm2
1596 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
1597 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
1598 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
1599 ; SSE41-NEXT: xorps %xmm1, %xmm1
1600 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
1601 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
1604 ; AVX1-LABEL: sitofp_4i64_to_4f32:
1606 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
1607 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1608 ; AVX1-NEXT: vmovq %xmm0, %rax
1609 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1610 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1611 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1612 ; AVX1-NEXT: vmovq %xmm0, %rax
1613 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1614 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1615 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
1616 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1617 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1618 ; AVX1-NEXT: vzeroupper
1621 ; AVX2-LABEL: sitofp_4i64_to_4f32:
1623 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
1624 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1625 ; AVX2-NEXT: vmovq %xmm0, %rax
1626 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1627 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1628 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm0
1629 ; AVX2-NEXT: vmovq %xmm0, %rax
1630 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1631 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1632 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
1633 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1634 ; AVX2-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1635 ; AVX2-NEXT: vzeroupper
1638 ; AVX512F-LABEL: sitofp_4i64_to_4f32:
1640 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1641 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1642 ; AVX512F-NEXT: vmovq %xmm0, %rax
1643 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1644 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1645 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm0
1646 ; AVX512F-NEXT: vmovq %xmm0, %rax
1647 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1648 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1649 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1650 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1651 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1652 ; AVX512F-NEXT: vzeroupper
1653 ; AVX512F-NEXT: retq
1655 ; AVX512VL-LABEL: sitofp_4i64_to_4f32:
1656 ; AVX512VL: # %bb.0:
1657 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1658 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm1, %xmm1
1659 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1660 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
1661 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
1662 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm0
1663 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1664 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1665 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
1666 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1667 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
1668 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
1669 ; AVX512VL-NEXT: vzeroupper
1670 ; AVX512VL-NEXT: retq
1672 ; AVX512DQ-LABEL: sitofp_4i64_to_4f32:
1673 ; AVX512DQ: # %bb.0:
1674 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1675 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
1676 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1677 ; AVX512DQ-NEXT: vzeroupper
1678 ; AVX512DQ-NEXT: retq
1680 ; AVX512VLDQ-LABEL: sitofp_4i64_to_4f32:
1681 ; AVX512VLDQ: # %bb.0:
1682 ; AVX512VLDQ-NEXT: vcvtqq2ps %ymm0, %xmm0
1683 ; AVX512VLDQ-NEXT: vzeroupper
1684 ; AVX512VLDQ-NEXT: retq
1685 %cvt = sitofp <4 x i64> %a to <4 x float>
1686 ret <4 x float> %cvt
1689 define <8 x float> @sitofp_8i32_to_8f32(<8 x i32> %a) {
1690 ; SSE-LABEL: sitofp_8i32_to_8f32:
1692 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
1693 ; SSE-NEXT: cvtdq2ps %xmm1, %xmm1
1696 ; AVX-LABEL: sitofp_8i32_to_8f32:
1698 ; AVX-NEXT: vcvtdq2ps %ymm0, %ymm0
1700 %cvt = sitofp <8 x i32> %a to <8 x float>
1701 ret <8 x float> %cvt
1704 define <8 x float> @sitofp_8i16_to_8f32(<8 x i16> %a) {
1705 ; SSE2-LABEL: sitofp_8i16_to_8f32:
1707 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
1708 ; SSE2-NEXT: psrad $16, %xmm1
1709 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm2
1710 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4,4,5,5,6,6,7,7]
1711 ; SSE2-NEXT: psrad $16, %xmm0
1712 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
1713 ; SSE2-NEXT: movaps %xmm2, %xmm0
1716 ; SSE41-LABEL: sitofp_8i16_to_8f32:
1718 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm1
1719 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
1720 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1721 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
1722 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
1723 ; SSE41-NEXT: movaps %xmm2, %xmm0
1726 ; AVX1-LABEL: sitofp_8i16_to_8f32:
1728 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm1
1729 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
1730 ; AVX1-NEXT: vpmovsxwd %xmm0, %xmm0
1731 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1732 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1735 ; AVX2-LABEL: sitofp_8i16_to_8f32:
1737 ; AVX2-NEXT: vpmovsxwd %xmm0, %ymm0
1738 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1741 ; AVX512-LABEL: sitofp_8i16_to_8f32:
1743 ; AVX512-NEXT: vpmovsxwd %xmm0, %ymm0
1744 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
1746 %cvt = sitofp <8 x i16> %a to <8 x float>
1747 ret <8 x float> %cvt
1750 define <8 x float> @sitofp_8i8_to_8f32(<16 x i8> %a) {
1751 ; SSE2-LABEL: sitofp_8i8_to_8f32:
1753 ; 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]
1754 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1755 ; SSE2-NEXT: psrad $24, %xmm0
1756 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1757 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4,4,5,5,6,6,7,7]
1758 ; SSE2-NEXT: psrad $24, %xmm1
1759 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
1762 ; SSE41-LABEL: sitofp_8i8_to_8f32:
1764 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
1765 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
1766 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
1767 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1768 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
1769 ; SSE41-NEXT: movaps %xmm2, %xmm0
1772 ; AVX1-LABEL: sitofp_8i8_to_8f32:
1774 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm1
1775 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
1776 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm0
1777 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1778 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1781 ; AVX2-LABEL: sitofp_8i8_to_8f32:
1783 ; AVX2-NEXT: vpmovsxbd %xmm0, %ymm0
1784 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1787 ; AVX512-LABEL: sitofp_8i8_to_8f32:
1789 ; AVX512-NEXT: vpmovsxbd %xmm0, %ymm0
1790 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
1792 %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>
1793 %cvt = sitofp <8 x i8> %shuf to <8 x float>
1794 ret <8 x float> %cvt
1797 define <8 x float> @sitofp_16i8_to_8f32(<16 x i8> %a) {
1798 ; SSE2-LABEL: sitofp_16i8_to_8f32:
1800 ; 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]
1801 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
1802 ; SSE2-NEXT: psrad $24, %xmm0
1803 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
1804 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4,4,5,5,6,6,7,7]
1805 ; SSE2-NEXT: psrad $24, %xmm1
1806 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
1809 ; SSE41-LABEL: sitofp_16i8_to_8f32:
1811 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm1
1812 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
1813 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
1814 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
1815 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
1816 ; SSE41-NEXT: movaps %xmm2, %xmm0
1819 ; AVX1-LABEL: sitofp_16i8_to_8f32:
1821 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm1
1822 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
1823 ; AVX1-NEXT: vpmovsxbd %xmm0, %xmm0
1824 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1825 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
1828 ; AVX2-LABEL: sitofp_16i8_to_8f32:
1830 ; AVX2-NEXT: vpmovsxbd %xmm0, %ymm0
1831 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
1834 ; AVX512-LABEL: sitofp_16i8_to_8f32:
1836 ; AVX512-NEXT: vpmovsxbd %xmm0, %zmm0
1837 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
1838 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1840 %cvt = sitofp <16 x i8> %a to <16 x float>
1841 %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>
1842 ret <8 x float> %shuf
1846 ; Unsigned Integer to Float
1849 define <4 x float> @uitofp_2i64_to_4f32(<2 x i64> %a) {
1850 ; SSE2-LABEL: uitofp_2i64_to_4f32:
1852 ; SSE2-NEXT: movdqa %xmm0, %xmm1
1853 ; SSE2-NEXT: movq %xmm0, %rax
1854 ; SSE2-NEXT: testq %rax, %rax
1855 ; SSE2-NEXT: js .LBB41_1
1856 ; SSE2-NEXT: # %bb.2:
1857 ; SSE2-NEXT: xorps %xmm0, %xmm0
1858 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1859 ; SSE2-NEXT: jmp .LBB41_3
1860 ; SSE2-NEXT: .LBB41_1:
1861 ; SSE2-NEXT: movq %rax, %rcx
1862 ; SSE2-NEXT: shrq %rcx
1863 ; SSE2-NEXT: andl $1, %eax
1864 ; SSE2-NEXT: orq %rcx, %rax
1865 ; SSE2-NEXT: xorps %xmm0, %xmm0
1866 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1867 ; SSE2-NEXT: addss %xmm0, %xmm0
1868 ; SSE2-NEXT: .LBB41_3:
1869 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
1870 ; SSE2-NEXT: movq %xmm1, %rax
1871 ; SSE2-NEXT: testq %rax, %rax
1872 ; SSE2-NEXT: js .LBB41_4
1873 ; SSE2-NEXT: # %bb.5:
1874 ; SSE2-NEXT: xorps %xmm1, %xmm1
1875 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1876 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1878 ; SSE2-NEXT: .LBB41_4:
1879 ; SSE2-NEXT: movq %rax, %rcx
1880 ; SSE2-NEXT: shrq %rcx
1881 ; SSE2-NEXT: andl $1, %eax
1882 ; SSE2-NEXT: orq %rcx, %rax
1883 ; SSE2-NEXT: xorps %xmm1, %xmm1
1884 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1885 ; SSE2-NEXT: addss %xmm1, %xmm1
1886 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
1889 ; SSE41-LABEL: uitofp_2i64_to_4f32:
1891 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1,1]
1892 ; SSE41-NEXT: pand %xmm0, %xmm1
1893 ; SSE41-NEXT: movdqa %xmm0, %xmm2
1894 ; SSE41-NEXT: psrlq $1, %xmm2
1895 ; SSE41-NEXT: por %xmm1, %xmm2
1896 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,3,2,3]
1897 ; SSE41-NEXT: blendvpd %xmm0, %xmm2, %xmm0
1898 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
1899 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
1900 ; SSE41-NEXT: movq %xmm0, %rax
1901 ; SSE41-NEXT: xorps %xmm2, %xmm2
1902 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
1903 ; SSE41-NEXT: insertps {{.*#+}} xmm2 = xmm2[0],xmm3[0],zero,zero
1904 ; SSE41-NEXT: movaps %xmm2, %xmm3
1905 ; SSE41-NEXT: addps %xmm2, %xmm3
1906 ; SSE41-NEXT: movdqa %xmm1, %xmm0
1907 ; SSE41-NEXT: blendvps %xmm0, %xmm3, %xmm2
1908 ; SSE41-NEXT: movaps %xmm2, %xmm0
1911 ; VEX-LABEL: uitofp_2i64_to_4f32:
1913 ; VEX-NEXT: vpand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
1914 ; VEX-NEXT: vpsrlq $1, %xmm0, %xmm2
1915 ; VEX-NEXT: vpor %xmm1, %xmm2, %xmm1
1916 ; VEX-NEXT: vblendvpd %xmm0, %xmm1, %xmm0, %xmm1
1917 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
1918 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
1919 ; VEX-NEXT: vmovq %xmm1, %rax
1920 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
1921 ; VEX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],zero,zero
1922 ; VEX-NEXT: vaddps %xmm1, %xmm1, %xmm2
1923 ; VEX-NEXT: vpxor %xmm3, %xmm3, %xmm3
1924 ; VEX-NEXT: vpcmpgtq %xmm0, %xmm3, %xmm0
1925 ; VEX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,3,2,3]
1926 ; VEX-NEXT: vblendvps %xmm0, %xmm2, %xmm1, %xmm0
1929 ; AVX512F-LABEL: uitofp_2i64_to_4f32:
1931 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
1932 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
1933 ; AVX512F-NEXT: vmovq %xmm0, %rax
1934 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
1935 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1936 ; AVX512F-NEXT: retq
1938 ; AVX512VL-LABEL: uitofp_2i64_to_4f32:
1939 ; AVX512VL: # %bb.0:
1940 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
1941 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
1942 ; AVX512VL-NEXT: vmovq %xmm0, %rax
1943 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
1944 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
1945 ; AVX512VL-NEXT: retq
1947 ; AVX512DQ-LABEL: uitofp_2i64_to_4f32:
1948 ; AVX512DQ: # %bb.0:
1949 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1950 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
1951 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1952 ; AVX512DQ-NEXT: vzeroupper
1953 ; AVX512DQ-NEXT: retq
1955 ; AVX512VLDQ-LABEL: uitofp_2i64_to_4f32:
1956 ; AVX512VLDQ: # %bb.0:
1957 ; AVX512VLDQ-NEXT: vcvtuqq2ps %xmm0, %xmm0
1958 ; AVX512VLDQ-NEXT: retq
1959 %cvt = uitofp <2 x i64> %a to <2 x float>
1960 %ext = shufflevector <2 x float> %cvt, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1961 ret <4 x float> %ext
1964 define <4 x float> @uitofp_2i64_to_2f32(<2 x i64> %a) {
1965 ; SSE2-LABEL: uitofp_2i64_to_2f32:
1967 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[2,3,2,3]
1968 ; SSE2-NEXT: movq %xmm1, %rax
1969 ; SSE2-NEXT: testq %rax, %rax
1970 ; SSE2-NEXT: js .LBB42_1
1971 ; SSE2-NEXT: # %bb.2:
1972 ; SSE2-NEXT: xorps %xmm1, %xmm1
1973 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1974 ; SSE2-NEXT: jmp .LBB42_3
1975 ; SSE2-NEXT: .LBB42_1:
1976 ; SSE2-NEXT: movq %rax, %rcx
1977 ; SSE2-NEXT: shrq %rcx
1978 ; SSE2-NEXT: andl $1, %eax
1979 ; SSE2-NEXT: orq %rcx, %rax
1980 ; SSE2-NEXT: xorps %xmm1, %xmm1
1981 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
1982 ; SSE2-NEXT: addss %xmm1, %xmm1
1983 ; SSE2-NEXT: .LBB42_3:
1984 ; SSE2-NEXT: movq %xmm0, %rax
1985 ; SSE2-NEXT: testq %rax, %rax
1986 ; SSE2-NEXT: js .LBB42_4
1987 ; SSE2-NEXT: # %bb.5:
1988 ; SSE2-NEXT: xorps %xmm0, %xmm0
1989 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1990 ; SSE2-NEXT: jmp .LBB42_6
1991 ; SSE2-NEXT: .LBB42_4:
1992 ; SSE2-NEXT: movq %rax, %rcx
1993 ; SSE2-NEXT: shrq %rcx
1994 ; SSE2-NEXT: andl $1, %eax
1995 ; SSE2-NEXT: orq %rcx, %rax
1996 ; SSE2-NEXT: xorps %xmm0, %xmm0
1997 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
1998 ; SSE2-NEXT: addss %xmm0, %xmm0
1999 ; SSE2-NEXT: .LBB42_6:
2000 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2001 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero
2004 ; SSE41-LABEL: uitofp_2i64_to_2f32:
2006 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1,1]
2007 ; SSE41-NEXT: pand %xmm0, %xmm1
2008 ; SSE41-NEXT: movdqa %xmm0, %xmm2
2009 ; SSE41-NEXT: psrlq $1, %xmm2
2010 ; SSE41-NEXT: por %xmm1, %xmm2
2011 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,3,2,3]
2012 ; SSE41-NEXT: blendvpd %xmm0, %xmm2, %xmm0
2013 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
2014 ; SSE41-NEXT: xorps %xmm2, %xmm2
2015 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
2016 ; SSE41-NEXT: movq %xmm0, %rax
2017 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
2018 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0],xmm2[0],zero,zero
2019 ; SSE41-NEXT: movaps %xmm3, %xmm2
2020 ; SSE41-NEXT: addps %xmm3, %xmm2
2021 ; SSE41-NEXT: movdqa %xmm1, %xmm0
2022 ; SSE41-NEXT: blendvps %xmm0, %xmm2, %xmm3
2023 ; SSE41-NEXT: movq {{.*#+}} xmm0 = xmm3[0],zero
2026 ; VEX-LABEL: uitofp_2i64_to_2f32:
2028 ; VEX-NEXT: vpand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
2029 ; VEX-NEXT: vpsrlq $1, %xmm0, %xmm2
2030 ; VEX-NEXT: vpor %xmm1, %xmm2, %xmm1
2031 ; VEX-NEXT: vblendvpd %xmm0, %xmm1, %xmm0, %xmm1
2032 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
2033 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2034 ; VEX-NEXT: vmovq %xmm1, %rax
2035 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
2036 ; VEX-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],xmm2[0],zero,zero
2037 ; VEX-NEXT: vaddps %xmm1, %xmm1, %xmm2
2038 ; VEX-NEXT: vpxor %xmm3, %xmm3, %xmm3
2039 ; VEX-NEXT: vpcmpgtq %xmm0, %xmm3, %xmm0
2040 ; VEX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,3,2,3]
2041 ; VEX-NEXT: vblendvps %xmm0, %xmm2, %xmm1, %xmm0
2042 ; VEX-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
2045 ; AVX512F-LABEL: uitofp_2i64_to_2f32:
2047 ; AVX512F-NEXT: vmovq %xmm0, %rax
2048 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2049 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2050 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2051 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
2052 ; AVX512F-NEXT: retq
2054 ; AVX512VL-LABEL: uitofp_2i64_to_2f32:
2055 ; AVX512VL: # %bb.0:
2056 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2057 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2058 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2059 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2060 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0],xmm0[0],zero,zero
2061 ; AVX512VL-NEXT: retq
2063 ; AVX512DQ-LABEL: uitofp_2i64_to_2f32:
2064 ; AVX512DQ: # %bb.0:
2065 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2066 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
2067 ; AVX512DQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
2068 ; AVX512DQ-NEXT: vzeroupper
2069 ; AVX512DQ-NEXT: retq
2071 ; AVX512VLDQ-LABEL: uitofp_2i64_to_2f32:
2072 ; AVX512VLDQ: # %bb.0:
2073 ; AVX512VLDQ-NEXT: vcvtuqq2ps %xmm0, %xmm0
2074 ; AVX512VLDQ-NEXT: retq
2075 %cvt = uitofp <2 x i64> %a to <2 x float>
2076 %ext = shufflevector <2 x float> %cvt, <2 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2077 ret <4 x float> %ext
2080 define <4 x float> @uitofp_4i64_to_4f32_undef(<2 x i64> %a) {
2081 ; SSE2-LABEL: uitofp_4i64_to_4f32_undef:
2083 ; SSE2-NEXT: movq %xmm0, %rax
2084 ; SSE2-NEXT: testq %rax, %rax
2085 ; SSE2-NEXT: js .LBB43_1
2086 ; SSE2-NEXT: # %bb.2:
2087 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2088 ; SSE2-NEXT: jmp .LBB43_3
2089 ; SSE2-NEXT: .LBB43_1:
2090 ; SSE2-NEXT: movq %rax, %rcx
2091 ; SSE2-NEXT: shrq %rcx
2092 ; SSE2-NEXT: andl $1, %eax
2093 ; SSE2-NEXT: orq %rcx, %rax
2094 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2095 ; SSE2-NEXT: addss %xmm1, %xmm1
2096 ; SSE2-NEXT: .LBB43_3:
2097 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
2098 ; SSE2-NEXT: movq %xmm0, %rax
2099 ; SSE2-NEXT: testq %rax, %rax
2100 ; SSE2-NEXT: js .LBB43_4
2101 ; SSE2-NEXT: # %bb.5:
2102 ; SSE2-NEXT: xorps %xmm0, %xmm0
2103 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2104 ; SSE2-NEXT: jmp .LBB43_6
2105 ; SSE2-NEXT: .LBB43_4:
2106 ; SSE2-NEXT: movq %rax, %rcx
2107 ; SSE2-NEXT: shrq %rcx
2108 ; SSE2-NEXT: andl $1, %eax
2109 ; SSE2-NEXT: orq %rcx, %rax
2110 ; SSE2-NEXT: xorps %xmm0, %xmm0
2111 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2112 ; SSE2-NEXT: addss %xmm0, %xmm0
2113 ; SSE2-NEXT: .LBB43_6:
2114 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2115 ; SSE2-NEXT: movq {{.*#+}} xmm0 = xmm1[0],zero
2118 ; SSE41-LABEL: uitofp_4i64_to_4f32_undef:
2120 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1,1]
2121 ; SSE41-NEXT: pand %xmm0, %xmm1
2122 ; SSE41-NEXT: movdqa %xmm0, %xmm2
2123 ; SSE41-NEXT: psrlq $1, %xmm2
2124 ; SSE41-NEXT: por %xmm1, %xmm2
2125 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,3,2,3]
2126 ; SSE41-NEXT: blendvpd %xmm0, %xmm2, %xmm0
2127 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
2128 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
2129 ; SSE41-NEXT: movq %xmm0, %rax
2130 ; SSE41-NEXT: xorps %xmm2, %xmm2
2131 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
2132 ; SSE41-NEXT: insertps {{.*#+}} xmm2 = xmm2[0],xmm3[0],zero,zero
2133 ; SSE41-NEXT: movaps %xmm2, %xmm3
2134 ; SSE41-NEXT: addps %xmm2, %xmm3
2135 ; SSE41-NEXT: movdqa %xmm1, %xmm0
2136 ; SSE41-NEXT: blendvps %xmm0, %xmm3, %xmm2
2137 ; SSE41-NEXT: movaps %xmm2, %xmm0
2140 ; AVX1-LABEL: uitofp_4i64_to_4f32_undef:
2142 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2143 ; AVX1-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm1
2144 ; AVX1-NEXT: vpsrlq $1, %xmm0, %xmm2
2145 ; AVX1-NEXT: vorps %ymm1, %ymm2, %ymm1
2146 ; AVX1-NEXT: vblendvpd %ymm0, %ymm1, %ymm0, %ymm1
2147 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
2148 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2149 ; AVX1-NEXT: vmovq %xmm1, %rax
2150 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm3, %xmm3
2151 ; AVX1-NEXT: vinsertps {{.*#+}} xmm2 = xmm3[0],xmm2[0],xmm3[2,3]
2152 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm1
2153 ; AVX1-NEXT: vmovq %xmm1, %rax
2154 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm4, %xmm3
2155 ; AVX1-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm3[0],xmm2[3]
2156 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
2157 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm4, %xmm1
2158 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0,1,2],xmm1[0]
2159 ; AVX1-NEXT: vaddps %xmm1, %xmm1, %xmm2
2160 ; AVX1-NEXT: vpackssdw %xmm0, %xmm0, %xmm0
2161 ; AVX1-NEXT: vblendvps %xmm0, %xmm2, %xmm1, %xmm0
2162 ; AVX1-NEXT: vzeroupper
2165 ; AVX2-LABEL: uitofp_4i64_to_4f32_undef:
2167 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2168 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [1,1,1,1]
2169 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm1
2170 ; AVX2-NEXT: vpsrlq $1, %ymm0, %ymm2
2171 ; AVX2-NEXT: vpor %ymm1, %ymm2, %ymm1
2172 ; AVX2-NEXT: vblendvpd %ymm0, %ymm1, %ymm0, %ymm1
2173 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
2174 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2175 ; AVX2-NEXT: vmovq %xmm1, %rax
2176 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm3
2177 ; AVX2-NEXT: vinsertps {{.*#+}} xmm2 = xmm3[0],xmm2[0],xmm3[2,3]
2178 ; AVX2-NEXT: vextracti128 $1, %ymm1, %xmm1
2179 ; AVX2-NEXT: vmovq %xmm1, %rax
2180 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm4, %xmm3
2181 ; AVX2-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm3[0],xmm2[3]
2182 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
2183 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm4, %xmm1
2184 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0,1,2],xmm1[0]
2185 ; AVX2-NEXT: vaddps %xmm1, %xmm1, %xmm2
2186 ; AVX2-NEXT: vpackssdw %xmm0, %xmm0, %xmm0
2187 ; AVX2-NEXT: vblendvps %xmm0, %xmm2, %xmm1, %xmm0
2188 ; AVX2-NEXT: vzeroupper
2191 ; AVX512F-LABEL: uitofp_4i64_to_4f32_undef:
2193 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2194 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2195 ; AVX512F-NEXT: vmovq %xmm0, %rax
2196 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2197 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2198 ; AVX512F-NEXT: retq
2200 ; AVX512VL-LABEL: uitofp_4i64_to_4f32_undef:
2201 ; AVX512VL: # %bb.0:
2202 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2203 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2204 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2205 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm0
2206 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],zero,zero
2207 ; AVX512VL-NEXT: retq
2209 ; AVX512DQ-LABEL: uitofp_4i64_to_4f32_undef:
2210 ; AVX512DQ: # %bb.0:
2211 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2212 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
2213 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2214 ; AVX512DQ-NEXT: vzeroupper
2215 ; AVX512DQ-NEXT: retq
2217 ; AVX512VLDQ-LABEL: uitofp_4i64_to_4f32_undef:
2218 ; AVX512VLDQ: # %bb.0:
2219 ; AVX512VLDQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2220 ; AVX512VLDQ-NEXT: vcvtuqq2ps %ymm0, %xmm0
2221 ; AVX512VLDQ-NEXT: vzeroupper
2222 ; AVX512VLDQ-NEXT: retq
2223 %ext = shufflevector <2 x i64> %a, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
2224 %cvt = uitofp <4 x i64> %ext to <4 x float>
2225 ret <4 x float> %cvt
2228 define <4 x float> @uitofp_4i32_to_4f32(<4 x i32> %a) {
2229 ; SSE2-LABEL: uitofp_4i32_to_4f32:
2231 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
2232 ; SSE2-NEXT: pand %xmm0, %xmm1
2233 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
2234 ; SSE2-NEXT: psrld $16, %xmm0
2235 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
2236 ; SSE2-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
2237 ; SSE2-NEXT: addps %xmm1, %xmm0
2240 ; SSE41-LABEL: uitofp_4i32_to_4f32:
2242 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
2243 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
2244 ; SSE41-NEXT: psrld $16, %xmm0
2245 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
2246 ; SSE41-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
2247 ; SSE41-NEXT: addps %xmm1, %xmm0
2250 ; AVX1-LABEL: uitofp_4i32_to_4f32:
2252 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
2253 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
2254 ; AVX1-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
2255 ; AVX1-NEXT: vsubps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
2256 ; AVX1-NEXT: vaddps %xmm0, %xmm1, %xmm0
2259 ; AVX2-LABEL: uitofp_4i32_to_4f32:
2261 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
2262 ; AVX2-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
2263 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm0
2264 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm2 = [1392508928,1392508928,1392508928,1392508928]
2265 ; AVX2-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
2266 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm2 = [5.49764202E+11,5.49764202E+11,5.49764202E+11,5.49764202E+11]
2267 ; AVX2-NEXT: vsubps %xmm2, %xmm0, %xmm0
2268 ; AVX2-NEXT: vaddps %xmm0, %xmm1, %xmm0
2271 ; AVX512F-LABEL: uitofp_4i32_to_4f32:
2273 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2274 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
2275 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2276 ; AVX512F-NEXT: vzeroupper
2277 ; AVX512F-NEXT: retq
2279 ; AVX512VL-LABEL: uitofp_4i32_to_4f32:
2280 ; AVX512VL: # %bb.0:
2281 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
2282 ; AVX512VL-NEXT: retq
2284 ; AVX512DQ-LABEL: uitofp_4i32_to_4f32:
2285 ; AVX512DQ: # %bb.0:
2286 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2287 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
2288 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2289 ; AVX512DQ-NEXT: vzeroupper
2290 ; AVX512DQ-NEXT: retq
2292 ; AVX512VLDQ-LABEL: uitofp_4i32_to_4f32:
2293 ; AVX512VLDQ: # %bb.0:
2294 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
2295 ; AVX512VLDQ-NEXT: retq
2296 %cvt = uitofp <4 x i32> %a to <4 x float>
2297 ret <4 x float> %cvt
2300 define <4 x float> @uitofp_4i16_to_4f32(<8 x i16> %a) {
2301 ; SSE2-LABEL: uitofp_4i16_to_4f32:
2303 ; SSE2-NEXT: pxor %xmm1, %xmm1
2304 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2305 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2308 ; SSE41-LABEL: uitofp_4i16_to_4f32:
2310 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2311 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2314 ; AVX-LABEL: uitofp_4i16_to_4f32:
2316 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2317 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
2319 %shuf = shufflevector <8 x i16> %a, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2320 %cvt = uitofp <4 x i16> %shuf to <4 x float>
2321 ret <4 x float> %cvt
2324 define <4 x float> @uitofp_8i16_to_4f32(<8 x i16> %a) {
2325 ; SSE2-LABEL: uitofp_8i16_to_4f32:
2327 ; SSE2-NEXT: pxor %xmm1, %xmm1
2328 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2329 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2332 ; SSE41-LABEL: uitofp_8i16_to_4f32:
2334 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2335 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2338 ; AVX1-LABEL: uitofp_8i16_to_4f32:
2340 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
2341 ; AVX1-NEXT: vpunpckhwd {{.*#+}} xmm1 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2342 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2343 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
2344 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2345 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2346 ; AVX1-NEXT: vzeroupper
2349 ; AVX2-LABEL: uitofp_8i16_to_4f32:
2351 ; 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
2352 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2353 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2354 ; AVX2-NEXT: vzeroupper
2357 ; AVX512-LABEL: uitofp_8i16_to_4f32:
2359 ; 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
2360 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
2361 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2362 ; AVX512-NEXT: vzeroupper
2364 %cvt = uitofp <8 x i16> %a to <8 x float>
2365 %shuf = shufflevector <8 x float> %cvt, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2366 ret <4 x float> %shuf
2369 define <4 x float> @uitofp_4i8_to_4f32(<16 x i8> %a) {
2370 ; SSE2-LABEL: uitofp_4i8_to_4f32:
2372 ; SSE2-NEXT: pxor %xmm1, %xmm1
2373 ; 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]
2374 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2375 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2378 ; SSE41-LABEL: uitofp_4i8_to_4f32:
2380 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2381 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2384 ; AVX-LABEL: uitofp_4i8_to_4f32:
2386 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2387 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
2389 %shuf = shufflevector <16 x i8> %a, <16 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2390 %cvt = uitofp <4 x i8> %shuf to <4 x float>
2391 ret <4 x float> %cvt
2394 define <4 x float> @uitofp_16i8_to_4f32(<16 x i8> %a) {
2395 ; SSE2-LABEL: uitofp_16i8_to_4f32:
2397 ; SSE2-NEXT: pxor %xmm1, %xmm1
2398 ; 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]
2399 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
2400 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
2403 ; SSE41-LABEL: uitofp_16i8_to_4f32:
2405 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2406 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
2409 ; AVX1-LABEL: uitofp_16i8_to_4f32:
2411 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2412 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
2413 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2414 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2415 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2416 ; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2417 ; AVX1-NEXT: vzeroupper
2420 ; AVX2-LABEL: uitofp_16i8_to_4f32:
2422 ; 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
2423 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2424 ; AVX2-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2425 ; AVX2-NEXT: vzeroupper
2428 ; AVX512-LABEL: uitofp_16i8_to_4f32:
2430 ; 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
2431 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
2432 ; AVX512-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2433 ; AVX512-NEXT: vzeroupper
2435 %cvt = uitofp <16 x i8> %a to <16 x float>
2436 %shuf = shufflevector <16 x float> %cvt, <16 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2437 ret <4 x float> %shuf
2440 define <4 x float> @uitofp_4i64_to_4f32(<4 x i64> %a) {
2441 ; SSE2-LABEL: uitofp_4i64_to_4f32:
2443 ; SSE2-NEXT: movq %xmm1, %rax
2444 ; SSE2-NEXT: testq %rax, %rax
2445 ; SSE2-NEXT: js .LBB49_1
2446 ; SSE2-NEXT: # %bb.2:
2447 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
2448 ; SSE2-NEXT: jmp .LBB49_3
2449 ; SSE2-NEXT: .LBB49_1:
2450 ; SSE2-NEXT: movq %rax, %rcx
2451 ; SSE2-NEXT: shrq %rcx
2452 ; SSE2-NEXT: andl $1, %eax
2453 ; SSE2-NEXT: orq %rcx, %rax
2454 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
2455 ; SSE2-NEXT: addss %xmm2, %xmm2
2456 ; SSE2-NEXT: .LBB49_3:
2457 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
2458 ; SSE2-NEXT: movq %xmm1, %rax
2459 ; SSE2-NEXT: testq %rax, %rax
2460 ; SSE2-NEXT: js .LBB49_4
2461 ; SSE2-NEXT: # %bb.5:
2462 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
2463 ; SSE2-NEXT: jmp .LBB49_6
2464 ; SSE2-NEXT: .LBB49_4:
2465 ; SSE2-NEXT: movq %rax, %rcx
2466 ; SSE2-NEXT: shrq %rcx
2467 ; SSE2-NEXT: andl $1, %eax
2468 ; SSE2-NEXT: orq %rcx, %rax
2469 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
2470 ; SSE2-NEXT: addss %xmm3, %xmm3
2471 ; SSE2-NEXT: .LBB49_6:
2472 ; SSE2-NEXT: movq %xmm0, %rax
2473 ; SSE2-NEXT: testq %rax, %rax
2474 ; SSE2-NEXT: js .LBB49_7
2475 ; SSE2-NEXT: # %bb.8:
2476 ; SSE2-NEXT: xorps %xmm1, %xmm1
2477 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2478 ; SSE2-NEXT: jmp .LBB49_9
2479 ; SSE2-NEXT: .LBB49_7:
2480 ; SSE2-NEXT: movq %rax, %rcx
2481 ; SSE2-NEXT: shrq %rcx
2482 ; SSE2-NEXT: andl $1, %eax
2483 ; SSE2-NEXT: orq %rcx, %rax
2484 ; SSE2-NEXT: xorps %xmm1, %xmm1
2485 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
2486 ; SSE2-NEXT: addss %xmm1, %xmm1
2487 ; SSE2-NEXT: .LBB49_9:
2488 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
2489 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
2490 ; SSE2-NEXT: movq %xmm0, %rax
2491 ; SSE2-NEXT: testq %rax, %rax
2492 ; SSE2-NEXT: js .LBB49_10
2493 ; SSE2-NEXT: # %bb.11:
2494 ; SSE2-NEXT: xorps %xmm0, %xmm0
2495 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2496 ; SSE2-NEXT: jmp .LBB49_12
2497 ; SSE2-NEXT: .LBB49_10:
2498 ; SSE2-NEXT: movq %rax, %rcx
2499 ; SSE2-NEXT: shrq %rcx
2500 ; SSE2-NEXT: andl $1, %eax
2501 ; SSE2-NEXT: orq %rcx, %rax
2502 ; SSE2-NEXT: xorps %xmm0, %xmm0
2503 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
2504 ; SSE2-NEXT: addss %xmm0, %xmm0
2505 ; SSE2-NEXT: .LBB49_12:
2506 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
2507 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm2[0]
2508 ; SSE2-NEXT: movaps %xmm1, %xmm0
2511 ; SSE41-LABEL: uitofp_4i64_to_4f32:
2513 ; SSE41-NEXT: movdqa %xmm1, %xmm2
2514 ; SSE41-NEXT: movdqa %xmm0, %xmm1
2515 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [1,1]
2516 ; SSE41-NEXT: pand %xmm4, %xmm0
2517 ; SSE41-NEXT: movdqa %xmm1, %xmm3
2518 ; SSE41-NEXT: psrlq $1, %xmm3
2519 ; SSE41-NEXT: por %xmm0, %xmm3
2520 ; SSE41-NEXT: movdqa %xmm1, %xmm5
2521 ; SSE41-NEXT: movdqa %xmm1, %xmm0
2522 ; SSE41-NEXT: blendvpd %xmm0, %xmm3, %xmm5
2523 ; SSE41-NEXT: pextrq $1, %xmm5, %rax
2524 ; SSE41-NEXT: xorps %xmm0, %xmm0
2525 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2526 ; SSE41-NEXT: movq %xmm5, %rax
2527 ; SSE41-NEXT: xorps %xmm3, %xmm3
2528 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
2529 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[2,3]
2530 ; SSE41-NEXT: pand %xmm2, %xmm4
2531 ; SSE41-NEXT: movdqa %xmm2, %xmm5
2532 ; SSE41-NEXT: psrlq $1, %xmm5
2533 ; SSE41-NEXT: por %xmm4, %xmm5
2534 ; SSE41-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,3],xmm2[1,3]
2535 ; SSE41-NEXT: movaps %xmm2, %xmm0
2536 ; SSE41-NEXT: blendvpd %xmm0, %xmm5, %xmm2
2537 ; SSE41-NEXT: movq %xmm2, %rax
2538 ; SSE41-NEXT: xorps %xmm0, %xmm0
2539 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2540 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0,1],xmm0[0],xmm3[3]
2541 ; SSE41-NEXT: pextrq $1, %xmm2, %rax
2542 ; SSE41-NEXT: xorps %xmm0, %xmm0
2543 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
2544 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0,1,2],xmm0[0]
2545 ; SSE41-NEXT: movaps %xmm3, %xmm2
2546 ; SSE41-NEXT: addps %xmm3, %xmm2
2547 ; SSE41-NEXT: movaps %xmm1, %xmm0
2548 ; SSE41-NEXT: blendvps %xmm0, %xmm2, %xmm3
2549 ; SSE41-NEXT: movaps %xmm3, %xmm0
2552 ; AVX1-LABEL: uitofp_4i64_to_4f32:
2554 ; AVX1-NEXT: vpsrlq $1, %xmm0, %xmm1
2555 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
2556 ; AVX1-NEXT: vpsrlq $1, %xmm2, %xmm3
2557 ; AVX1-NEXT: vinsertf128 $1, %xmm3, %ymm1, %ymm1
2558 ; AVX1-NEXT: vandpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm3
2559 ; AVX1-NEXT: vorpd %ymm3, %ymm1, %ymm1
2560 ; AVX1-NEXT: vblendvpd %ymm0, %ymm1, %ymm0, %ymm1
2561 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
2562 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm4, %xmm3
2563 ; AVX1-NEXT: vmovq %xmm1, %rax
2564 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
2565 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm4[0],xmm3[0],xmm4[2,3]
2566 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm1
2567 ; AVX1-NEXT: vmovq %xmm1, %rax
2568 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
2569 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm3[0,1],xmm4[0],xmm3[3]
2570 ; AVX1-NEXT: vpextrq $1, %xmm1, %rax
2571 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
2572 ; AVX1-NEXT: vinsertps {{.*#+}} xmm1 = xmm3[0,1,2],xmm1[0]
2573 ; AVX1-NEXT: vaddps %xmm1, %xmm1, %xmm3
2574 ; AVX1-NEXT: vpackssdw %xmm2, %xmm0, %xmm0
2575 ; AVX1-NEXT: vblendvps %xmm0, %xmm3, %xmm1, %xmm0
2576 ; AVX1-NEXT: vzeroupper
2579 ; AVX2-LABEL: uitofp_4i64_to_4f32:
2581 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [1,1,1,1]
2582 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm1
2583 ; AVX2-NEXT: vpsrlq $1, %ymm0, %ymm2
2584 ; AVX2-NEXT: vpor %ymm1, %ymm2, %ymm1
2585 ; AVX2-NEXT: vblendvpd %ymm0, %ymm1, %ymm0, %ymm1
2586 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
2587 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
2588 ; AVX2-NEXT: vmovq %xmm1, %rax
2589 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm3
2590 ; AVX2-NEXT: vinsertps {{.*#+}} xmm2 = xmm3[0],xmm2[0],xmm3[2,3]
2591 ; AVX2-NEXT: vextracti128 $1, %ymm1, %xmm1
2592 ; AVX2-NEXT: vmovq %xmm1, %rax
2593 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm4, %xmm3
2594 ; AVX2-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm3[0],xmm2[3]
2595 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
2596 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm4, %xmm1
2597 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0,1,2],xmm1[0]
2598 ; AVX2-NEXT: vaddps %xmm1, %xmm1, %xmm2
2599 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm3
2600 ; AVX2-NEXT: vpackssdw %xmm3, %xmm0, %xmm0
2601 ; AVX2-NEXT: vblendvps %xmm0, %xmm2, %xmm1, %xmm0
2602 ; AVX2-NEXT: vzeroupper
2605 ; AVX512F-LABEL: uitofp_4i64_to_4f32:
2607 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2608 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2609 ; AVX512F-NEXT: vmovq %xmm0, %rax
2610 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
2611 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
2612 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm0
2613 ; AVX512F-NEXT: vmovq %xmm0, %rax
2614 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
2615 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
2616 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2617 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
2618 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2619 ; AVX512F-NEXT: vzeroupper
2620 ; AVX512F-NEXT: retq
2622 ; AVX512VL-LABEL: uitofp_4i64_to_4f32:
2623 ; AVX512VL: # %bb.0:
2624 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2625 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm1, %xmm1
2626 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2627 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
2628 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
2629 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm0
2630 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2631 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
2632 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
2633 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2634 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
2635 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
2636 ; AVX512VL-NEXT: vzeroupper
2637 ; AVX512VL-NEXT: retq
2639 ; AVX512DQ-LABEL: uitofp_4i64_to_4f32:
2640 ; AVX512DQ: # %bb.0:
2641 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2642 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
2643 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2644 ; AVX512DQ-NEXT: vzeroupper
2645 ; AVX512DQ-NEXT: retq
2647 ; AVX512VLDQ-LABEL: uitofp_4i64_to_4f32:
2648 ; AVX512VLDQ: # %bb.0:
2649 ; AVX512VLDQ-NEXT: vcvtuqq2ps %ymm0, %xmm0
2650 ; AVX512VLDQ-NEXT: vzeroupper
2651 ; AVX512VLDQ-NEXT: retq
2652 %cvt = uitofp <4 x i64> %a to <4 x float>
2653 ret <4 x float> %cvt
2656 define <8 x float> @uitofp_8i32_to_8f32(<8 x i32> %a) {
2657 ; SSE2-LABEL: uitofp_8i32_to_8f32:
2659 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [65535,65535,65535,65535]
2660 ; SSE2-NEXT: movdqa %xmm0, %xmm3
2661 ; SSE2-NEXT: pand %xmm2, %xmm3
2662 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [1258291200,1258291200,1258291200,1258291200]
2663 ; SSE2-NEXT: por %xmm4, %xmm3
2664 ; SSE2-NEXT: psrld $16, %xmm0
2665 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [1392508928,1392508928,1392508928,1392508928]
2666 ; SSE2-NEXT: por %xmm5, %xmm0
2667 ; SSE2-NEXT: movaps {{.*#+}} xmm6 = [5.49764202E+11,5.49764202E+11,5.49764202E+11,5.49764202E+11]
2668 ; SSE2-NEXT: subps %xmm6, %xmm0
2669 ; SSE2-NEXT: addps %xmm3, %xmm0
2670 ; SSE2-NEXT: pand %xmm1, %xmm2
2671 ; SSE2-NEXT: por %xmm4, %xmm2
2672 ; SSE2-NEXT: psrld $16, %xmm1
2673 ; SSE2-NEXT: por %xmm5, %xmm1
2674 ; SSE2-NEXT: subps %xmm6, %xmm1
2675 ; SSE2-NEXT: addps %xmm2, %xmm1
2678 ; SSE41-LABEL: uitofp_8i32_to_8f32:
2680 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [1258291200,1258291200,1258291200,1258291200]
2681 ; SSE41-NEXT: movdqa %xmm0, %xmm3
2682 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0],xmm2[1],xmm3[2],xmm2[3],xmm3[4],xmm2[5],xmm3[6],xmm2[7]
2683 ; SSE41-NEXT: psrld $16, %xmm0
2684 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [1392508928,1392508928,1392508928,1392508928]
2685 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm4[1],xmm0[2],xmm4[3],xmm0[4],xmm4[5],xmm0[6],xmm4[7]
2686 ; SSE41-NEXT: movaps {{.*#+}} xmm5 = [5.49764202E+11,5.49764202E+11,5.49764202E+11,5.49764202E+11]
2687 ; SSE41-NEXT: subps %xmm5, %xmm0
2688 ; SSE41-NEXT: addps %xmm3, %xmm0
2689 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3],xmm1[4],xmm2[5],xmm1[6],xmm2[7]
2690 ; SSE41-NEXT: psrld $16, %xmm1
2691 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0],xmm4[1],xmm1[2],xmm4[3],xmm1[4],xmm4[5],xmm1[6],xmm4[7]
2692 ; SSE41-NEXT: subps %xmm5, %xmm1
2693 ; SSE41-NEXT: addps %xmm2, %xmm1
2696 ; AVX1-LABEL: uitofp_8i32_to_8f32:
2698 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm1
2699 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
2700 ; AVX1-NEXT: vpsrld $16, %xmm2, %xmm2
2701 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm1, %ymm1
2702 ; AVX1-NEXT: vcvtdq2ps %ymm1, %ymm1
2703 ; AVX1-NEXT: vmulps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm1, %ymm1
2704 ; AVX1-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2705 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2706 ; AVX1-NEXT: vaddps %ymm0, %ymm1, %ymm0
2709 ; AVX2-LABEL: uitofp_8i32_to_8f32:
2711 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200]
2712 ; 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]
2713 ; AVX2-NEXT: vpsrld $16, %ymm0, %ymm0
2714 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm2 = [1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928]
2715 ; 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]
2716 ; 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]
2717 ; AVX2-NEXT: vsubps %ymm2, %ymm0, %ymm0
2718 ; AVX2-NEXT: vaddps %ymm0, %ymm1, %ymm0
2721 ; AVX512F-LABEL: uitofp_8i32_to_8f32:
2723 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2724 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
2725 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2726 ; AVX512F-NEXT: retq
2728 ; AVX512VL-LABEL: uitofp_8i32_to_8f32:
2729 ; AVX512VL: # %bb.0:
2730 ; AVX512VL-NEXT: vcvtudq2ps %ymm0, %ymm0
2731 ; AVX512VL-NEXT: retq
2733 ; AVX512DQ-LABEL: uitofp_8i32_to_8f32:
2734 ; AVX512DQ: # %bb.0:
2735 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2736 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
2737 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2738 ; AVX512DQ-NEXT: retq
2740 ; AVX512VLDQ-LABEL: uitofp_8i32_to_8f32:
2741 ; AVX512VLDQ: # %bb.0:
2742 ; AVX512VLDQ-NEXT: vcvtudq2ps %ymm0, %ymm0
2743 ; AVX512VLDQ-NEXT: retq
2744 %cvt = uitofp <8 x i32> %a to <8 x float>
2745 ret <8 x float> %cvt
2748 define <8 x float> @uitofp_8i16_to_8f32(<8 x i16> %a) {
2749 ; SSE2-LABEL: uitofp_8i16_to_8f32:
2751 ; SSE2-NEXT: pxor %xmm1, %xmm1
2752 ; SSE2-NEXT: movdqa %xmm0, %xmm2
2753 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
2754 ; SSE2-NEXT: cvtdq2ps %xmm2, %xmm2
2755 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2756 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
2757 ; SSE2-NEXT: movaps %xmm2, %xmm0
2760 ; SSE41-LABEL: uitofp_8i16_to_8f32:
2762 ; SSE41-NEXT: pxor %xmm1, %xmm1
2763 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm2 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2764 ; SSE41-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2765 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
2766 ; SSE41-NEXT: cvtdq2ps %xmm2, %xmm0
2769 ; AVX1-LABEL: uitofp_8i16_to_8f32:
2771 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
2772 ; AVX1-NEXT: vpunpckhwd {{.*#+}} xmm1 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2773 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
2774 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
2775 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2778 ; AVX2-LABEL: uitofp_8i16_to_8f32:
2780 ; 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
2781 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2784 ; AVX512-LABEL: uitofp_8i16_to_8f32:
2786 ; 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
2787 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
2789 %cvt = uitofp <8 x i16> %a to <8 x float>
2790 ret <8 x float> %cvt
2793 define <8 x float> @uitofp_8i8_to_8f32(<16 x i8> %a) {
2794 ; SSE2-LABEL: uitofp_8i8_to_8f32:
2796 ; SSE2-NEXT: pxor %xmm1, %xmm1
2797 ; 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]
2798 ; SSE2-NEXT: movdqa %xmm0, %xmm2
2799 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
2800 ; SSE2-NEXT: cvtdq2ps %xmm2, %xmm2
2801 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2802 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
2803 ; SSE2-NEXT: movaps %xmm2, %xmm0
2806 ; SSE41-LABEL: uitofp_8i8_to_8f32:
2808 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2809 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
2810 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
2811 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2812 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
2813 ; SSE41-NEXT: movaps %xmm2, %xmm0
2816 ; AVX1-LABEL: uitofp_8i8_to_8f32:
2818 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2819 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
2820 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2821 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2822 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2825 ; AVX2-LABEL: uitofp_8i8_to_8f32:
2827 ; 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
2828 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2831 ; AVX512-LABEL: uitofp_8i8_to_8f32:
2833 ; 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
2834 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
2836 %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>
2837 %cvt = uitofp <8 x i8> %shuf to <8 x float>
2838 ret <8 x float> %cvt
2841 define <8 x float> @uitofp_16i8_to_8f32(<16 x i8> %a) {
2842 ; SSE2-LABEL: uitofp_16i8_to_8f32:
2844 ; SSE2-NEXT: pxor %xmm1, %xmm1
2845 ; 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]
2846 ; SSE2-NEXT: movdqa %xmm0, %xmm2
2847 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
2848 ; SSE2-NEXT: cvtdq2ps %xmm2, %xmm2
2849 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
2850 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm1
2851 ; SSE2-NEXT: movaps %xmm2, %xmm0
2854 ; SSE41-LABEL: uitofp_16i8_to_8f32:
2856 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2857 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm2
2858 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
2859 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2860 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm1
2861 ; SSE41-NEXT: movaps %xmm2, %xmm0
2864 ; AVX1-LABEL: uitofp_16i8_to_8f32:
2866 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2867 ; AVX1-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,1,1]
2868 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
2869 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2870 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
2873 ; AVX2-LABEL: uitofp_16i8_to_8f32:
2875 ; 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
2876 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
2879 ; AVX512-LABEL: uitofp_16i8_to_8f32:
2881 ; 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
2882 ; AVX512-NEXT: vcvtdq2ps %zmm0, %zmm0
2883 ; AVX512-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2885 %cvt = uitofp <16 x i8> %a to <16 x float>
2886 %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>
2887 ret <8 x float> %shuf
2891 ; Load Signed Integer to Double
2894 define <2 x double> @sitofp_load_2i64_to_2f64(<2 x i64> *%a) {
2895 ; SSE2-LABEL: sitofp_load_2i64_to_2f64:
2897 ; SSE2-NEXT: movdqa (%rdi), %xmm1
2898 ; SSE2-NEXT: movq %xmm1, %rax
2899 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
2900 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
2901 ; SSE2-NEXT: movq %xmm1, %rax
2902 ; SSE2-NEXT: xorps %xmm1, %xmm1
2903 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
2904 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2907 ; SSE41-LABEL: sitofp_load_2i64_to_2f64:
2909 ; SSE41-NEXT: movdqa (%rdi), %xmm0
2910 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
2911 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
2912 ; SSE41-NEXT: movq %xmm0, %rax
2913 ; SSE41-NEXT: xorps %xmm0, %xmm0
2914 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
2915 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2918 ; VEX-LABEL: sitofp_load_2i64_to_2f64:
2920 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
2921 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
2922 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
2923 ; VEX-NEXT: vmovq %xmm0, %rax
2924 ; VEX-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
2925 ; VEX-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2928 ; AVX512F-LABEL: sitofp_load_2i64_to_2f64:
2930 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
2931 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
2932 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
2933 ; AVX512F-NEXT: vmovq %xmm0, %rax
2934 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
2935 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2936 ; AVX512F-NEXT: retq
2938 ; AVX512VL-LABEL: sitofp_load_2i64_to_2f64:
2939 ; AVX512VL: # %bb.0:
2940 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
2941 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
2942 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm1, %xmm1
2943 ; AVX512VL-NEXT: vmovq %xmm0, %rax
2944 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm0
2945 ; AVX512VL-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2946 ; AVX512VL-NEXT: retq
2948 ; AVX512DQ-LABEL: sitofp_load_2i64_to_2f64:
2949 ; AVX512DQ: # %bb.0:
2950 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
2951 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
2952 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2953 ; AVX512DQ-NEXT: vzeroupper
2954 ; AVX512DQ-NEXT: retq
2956 ; AVX512VLDQ-LABEL: sitofp_load_2i64_to_2f64:
2957 ; AVX512VLDQ: # %bb.0:
2958 ; AVX512VLDQ-NEXT: vcvtqq2pd (%rdi), %xmm0
2959 ; AVX512VLDQ-NEXT: retq
2960 %ld = load <2 x i64>, <2 x i64> *%a
2961 %cvt = sitofp <2 x i64> %ld to <2 x double>
2962 ret <2 x double> %cvt
2965 define <2 x double> @sitofp_load_2i32_to_2f64(<2 x i32> *%a) {
2966 ; SSE-LABEL: sitofp_load_2i32_to_2f64:
2968 ; SSE-NEXT: cvtdq2pd (%rdi), %xmm0
2971 ; AVX-LABEL: sitofp_load_2i32_to_2f64:
2973 ; AVX-NEXT: vcvtdq2pd (%rdi), %xmm0
2975 %ld = load <2 x i32>, <2 x i32> *%a
2976 %cvt = sitofp <2 x i32> %ld to <2 x double>
2977 ret <2 x double> %cvt
2980 define <2 x double> @sitofp_volatile_load_4i32_to_2f64(<4 x i32> *%a) {
2981 ; SSE-LABEL: sitofp_volatile_load_4i32_to_2f64:
2983 ; SSE-NEXT: movaps (%rdi), %xmm0
2984 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
2987 ; AVX-LABEL: sitofp_volatile_load_4i32_to_2f64:
2989 ; AVX-NEXT: vmovaps (%rdi), %xmm0
2990 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
2992 %ld = load volatile <4 x i32>, <4 x i32> *%a
2993 %b = shufflevector <4 x i32> %ld, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
2994 %cvt = sitofp <2 x i32> %b to <2 x double>
2995 ret <2 x double> %cvt
2998 define <2 x double> @sitofp_load_4i32_to_2f64_2(<4 x i32>* %x) {
2999 ; SSE-LABEL: sitofp_load_4i32_to_2f64_2:
3001 ; SSE-NEXT: cvtdq2pd (%rdi), %xmm0
3004 ; AVX-LABEL: sitofp_load_4i32_to_2f64_2:
3006 ; AVX-NEXT: vcvtdq2pd (%rdi), %xmm0
3008 %a = load <4 x i32>, <4 x i32>* %x
3009 %b = sitofp <4 x i32> %a to <4 x double>
3010 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3014 define <2 x double> @sitofp_volatile_load_4i32_to_2f64_2(<4 x i32>* %x) {
3015 ; SSE-LABEL: sitofp_volatile_load_4i32_to_2f64_2:
3017 ; SSE-NEXT: movaps (%rdi), %xmm0
3018 ; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
3021 ; AVX-LABEL: sitofp_volatile_load_4i32_to_2f64_2:
3023 ; AVX-NEXT: vmovaps (%rdi), %xmm0
3024 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3026 %a = load volatile <4 x i32>, <4 x i32>* %x
3027 %b = sitofp <4 x i32> %a to <4 x double>
3028 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3032 define <2 x double> @sitofp_load_2i16_to_2f64(<2 x i16> *%a) {
3033 ; SSE2-LABEL: sitofp_load_2i16_to_2f64:
3035 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3036 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
3037 ; SSE2-NEXT: psrad $16, %xmm0
3038 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3041 ; SSE41-LABEL: sitofp_load_2i16_to_2f64:
3043 ; SSE41-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3044 ; SSE41-NEXT: pmovsxwd %xmm0, %xmm0
3045 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3048 ; AVX-LABEL: sitofp_load_2i16_to_2f64:
3050 ; AVX-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3051 ; AVX-NEXT: vpmovsxwd %xmm0, %xmm0
3052 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3054 %ld = load <2 x i16>, <2 x i16> *%a
3055 %cvt = sitofp <2 x i16> %ld to <2 x double>
3056 ret <2 x double> %cvt
3059 define <2 x double> @sitofp_load_2i8_to_2f64(<2 x i8> *%a) {
3060 ; SSE2-LABEL: sitofp_load_2i8_to_2f64:
3062 ; SSE2-NEXT: movzwl (%rdi), %eax
3063 ; SSE2-NEXT: movd %eax, %xmm0
3064 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
3065 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,0,2,1,4,5,6,7]
3066 ; SSE2-NEXT: psrad $24, %xmm0
3067 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3070 ; SSE41-LABEL: sitofp_load_2i8_to_2f64:
3072 ; SSE41-NEXT: movzwl (%rdi), %eax
3073 ; SSE41-NEXT: movd %eax, %xmm0
3074 ; SSE41-NEXT: pmovsxbd %xmm0, %xmm0
3075 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3078 ; AVX-LABEL: sitofp_load_2i8_to_2f64:
3080 ; AVX-NEXT: movzwl (%rdi), %eax
3081 ; AVX-NEXT: vmovd %eax, %xmm0
3082 ; AVX-NEXT: vpmovsxbd %xmm0, %xmm0
3083 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3085 %ld = load <2 x i8>, <2 x i8> *%a
3086 %cvt = sitofp <2 x i8> %ld to <2 x double>
3087 ret <2 x double> %cvt
3090 define <4 x double> @sitofp_load_4i64_to_4f64(<4 x i64> *%a) {
3091 ; SSE2-LABEL: sitofp_load_4i64_to_4f64:
3093 ; SSE2-NEXT: movdqa (%rdi), %xmm1
3094 ; SSE2-NEXT: movdqa 16(%rdi), %xmm2
3095 ; SSE2-NEXT: movq %xmm1, %rax
3096 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
3097 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3098 ; SSE2-NEXT: movq %xmm1, %rax
3099 ; SSE2-NEXT: xorps %xmm1, %xmm1
3100 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
3101 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3102 ; SSE2-NEXT: movq %xmm2, %rax
3103 ; SSE2-NEXT: xorps %xmm1, %xmm1
3104 ; SSE2-NEXT: cvtsi2sd %rax, %xmm1
3105 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
3106 ; SSE2-NEXT: movq %xmm2, %rax
3107 ; SSE2-NEXT: xorps %xmm2, %xmm2
3108 ; SSE2-NEXT: cvtsi2sd %rax, %xmm2
3109 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3112 ; SSE41-LABEL: sitofp_load_4i64_to_4f64:
3114 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3115 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
3116 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
3117 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
3118 ; SSE41-NEXT: movq %xmm0, %rax
3119 ; SSE41-NEXT: xorps %xmm0, %xmm0
3120 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
3121 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3122 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
3123 ; SSE41-NEXT: xorps %xmm2, %xmm2
3124 ; SSE41-NEXT: cvtsi2sd %rax, %xmm2
3125 ; SSE41-NEXT: movq %xmm1, %rax
3126 ; SSE41-NEXT: xorps %xmm1, %xmm1
3127 ; SSE41-NEXT: cvtsi2sd %rax, %xmm1
3128 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3131 ; VEX-LABEL: sitofp_load_4i64_to_4f64:
3133 ; VEX-NEXT: vmovapd (%rdi), %xmm0
3134 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm1
3135 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
3136 ; VEX-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
3137 ; VEX-NEXT: vmovq %xmm1, %rax
3138 ; VEX-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
3139 ; VEX-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3140 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
3141 ; VEX-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
3142 ; VEX-NEXT: vmovq %xmm0, %rax
3143 ; VEX-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
3144 ; VEX-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3145 ; VEX-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3148 ; AVX512F-LABEL: sitofp_load_4i64_to_4f64:
3150 ; AVX512F-NEXT: vmovapd (%rdi), %xmm0
3151 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
3152 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
3153 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
3154 ; AVX512F-NEXT: vmovq %xmm1, %rax
3155 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
3156 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3157 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
3158 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
3159 ; AVX512F-NEXT: vmovq %xmm0, %rax
3160 ; AVX512F-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
3161 ; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3162 ; AVX512F-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3163 ; AVX512F-NEXT: retq
3165 ; AVX512VL-LABEL: sitofp_load_4i64_to_4f64:
3166 ; AVX512VL: # %bb.0:
3167 ; AVX512VL-NEXT: vmovapd (%rdi), %xmm0
3168 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
3169 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
3170 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm2, %xmm2
3171 ; AVX512VL-NEXT: vmovq %xmm1, %rax
3172 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm1
3173 ; AVX512VL-NEXT: vunpcklpd {{.*#+}} xmm1 = xmm1[0],xmm2[0]
3174 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
3175 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm2
3176 ; AVX512VL-NEXT: vmovq %xmm0, %rax
3177 ; AVX512VL-NEXT: vcvtsi2sd %rax, %xmm3, %xmm0
3178 ; AVX512VL-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3179 ; AVX512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3180 ; AVX512VL-NEXT: retq
3182 ; AVX512DQ-LABEL: sitofp_load_4i64_to_4f64:
3183 ; AVX512DQ: # %bb.0:
3184 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
3185 ; AVX512DQ-NEXT: vcvtqq2pd %zmm0, %zmm0
3186 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3187 ; AVX512DQ-NEXT: retq
3189 ; AVX512VLDQ-LABEL: sitofp_load_4i64_to_4f64:
3190 ; AVX512VLDQ: # %bb.0:
3191 ; AVX512VLDQ-NEXT: vcvtqq2pd (%rdi), %ymm0
3192 ; AVX512VLDQ-NEXT: retq
3193 %ld = load <4 x i64>, <4 x i64> *%a
3194 %cvt = sitofp <4 x i64> %ld to <4 x double>
3195 ret <4 x double> %cvt
3198 define <4 x double> @sitofp_load_4i32_to_4f64(<4 x i32> *%a) {
3199 ; SSE-LABEL: sitofp_load_4i32_to_4f64:
3201 ; SSE-NEXT: movdqa (%rdi), %xmm1
3202 ; SSE-NEXT: cvtdq2pd %xmm1, %xmm0
3203 ; SSE-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3204 ; SSE-NEXT: cvtdq2pd %xmm1, %xmm1
3207 ; AVX-LABEL: sitofp_load_4i32_to_4f64:
3209 ; AVX-NEXT: vcvtdq2pd (%rdi), %ymm0
3211 %ld = load <4 x i32>, <4 x i32> *%a
3212 %cvt = sitofp <4 x i32> %ld to <4 x double>
3213 ret <4 x double> %cvt
3216 define <4 x double> @sitofp_load_4i16_to_4f64(<4 x i16> *%a) {
3217 ; SSE2-LABEL: sitofp_load_4i16_to_4f64:
3219 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
3220 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3221 ; SSE2-NEXT: psrad $16, %xmm1
3222 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3223 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3224 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3227 ; SSE41-LABEL: sitofp_load_4i16_to_4f64:
3229 ; SSE41-NEXT: pmovsxwd (%rdi), %xmm1
3230 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3231 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3232 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3235 ; AVX-LABEL: sitofp_load_4i16_to_4f64:
3237 ; AVX-NEXT: vpmovsxwd (%rdi), %xmm0
3238 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3240 %ld = load <4 x i16>, <4 x i16> *%a
3241 %cvt = sitofp <4 x i16> %ld to <4 x double>
3242 ret <4 x double> %cvt
3245 define <4 x double> @sitofp_load_4i8_to_4f64(<4 x i8> *%a) {
3246 ; SSE2-LABEL: sitofp_load_4i8_to_4f64:
3248 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3249 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
3250 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3251 ; SSE2-NEXT: psrad $24, %xmm1
3252 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3253 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3254 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3257 ; SSE41-LABEL: sitofp_load_4i8_to_4f64:
3259 ; SSE41-NEXT: pmovsxbd (%rdi), %xmm1
3260 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3261 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3262 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3265 ; AVX-LABEL: sitofp_load_4i8_to_4f64:
3267 ; AVX-NEXT: vpmovsxbd (%rdi), %xmm0
3268 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3270 %ld = load <4 x i8>, <4 x i8> *%a
3271 %cvt = sitofp <4 x i8> %ld to <4 x double>
3272 ret <4 x double> %cvt
3276 ; Load Unsigned Integer to Double
3279 define <2 x double> @uitofp_load_2i64_to_2f64(<2 x i64> *%a) {
3280 ; SSE2-LABEL: uitofp_load_2i64_to_2f64:
3282 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3283 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [4294967295,4294967295]
3284 ; SSE2-NEXT: pand %xmm0, %xmm1
3285 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
3286 ; SSE2-NEXT: psrlq $32, %xmm0
3287 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3288 ; SSE2-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3289 ; SSE2-NEXT: addpd %xmm1, %xmm0
3292 ; SSE41-LABEL: uitofp_load_2i64_to_2f64:
3294 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3295 ; SSE41-NEXT: pxor %xmm1, %xmm1
3296 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
3297 ; SSE41-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
3298 ; SSE41-NEXT: psrlq $32, %xmm0
3299 ; SSE41-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3300 ; SSE41-NEXT: subpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
3301 ; SSE41-NEXT: addpd %xmm1, %xmm0
3304 ; AVX1-LABEL: uitofp_load_2i64_to_2f64:
3306 ; AVX1-NEXT: vmovdqa (%rdi), %xmm0
3307 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
3308 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5],xmm1[6,7]
3309 ; AVX1-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
3310 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm0
3311 ; AVX1-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3312 ; AVX1-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3313 ; AVX1-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3316 ; AVX2-LABEL: uitofp_load_2i64_to_2f64:
3318 ; AVX2-NEXT: vmovdqa (%rdi), %xmm0
3319 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3320 ; AVX2-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
3321 ; AVX2-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
3322 ; AVX2-NEXT: vpsrlq $32, %xmm0, %xmm0
3323 ; AVX2-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3324 ; AVX2-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3325 ; AVX2-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3328 ; AVX512F-LABEL: uitofp_load_2i64_to_2f64:
3330 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
3331 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
3332 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
3333 ; AVX512F-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
3334 ; AVX512F-NEXT: vpsrlq $32, %xmm0, %xmm0
3335 ; AVX512F-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3336 ; AVX512F-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3337 ; AVX512F-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3338 ; AVX512F-NEXT: retq
3340 ; AVX512VL-LABEL: uitofp_load_2i64_to_2f64:
3341 ; AVX512VL: # %bb.0:
3342 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
3343 ; AVX512VL-NEXT: vpxor %xmm1, %xmm1, %xmm1
3344 ; AVX512VL-NEXT: vpblendd {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
3345 ; AVX512VL-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1, %xmm1
3346 ; AVX512VL-NEXT: vpsrlq $32, %xmm0, %xmm0
3347 ; AVX512VL-NEXT: vpor {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3348 ; AVX512VL-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
3349 ; AVX512VL-NEXT: vaddpd %xmm0, %xmm1, %xmm0
3350 ; AVX512VL-NEXT: retq
3352 ; AVX512DQ-LABEL: uitofp_load_2i64_to_2f64:
3353 ; AVX512DQ: # %bb.0:
3354 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3355 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
3356 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3357 ; AVX512DQ-NEXT: vzeroupper
3358 ; AVX512DQ-NEXT: retq
3360 ; AVX512VLDQ-LABEL: uitofp_load_2i64_to_2f64:
3361 ; AVX512VLDQ: # %bb.0:
3362 ; AVX512VLDQ-NEXT: vcvtuqq2pd (%rdi), %xmm0
3363 ; AVX512VLDQ-NEXT: retq
3364 %ld = load <2 x i64>, <2 x i64> *%a
3365 %cvt = uitofp <2 x i64> %ld to <2 x double>
3366 ret <2 x double> %cvt
3369 define <2 x double> @uitofp_load_2i32_to_2f64(<2 x i32> *%a) {
3370 ; SSE2-LABEL: uitofp_load_2i32_to_2f64:
3372 ; SSE2-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3373 ; SSE2-NEXT: xorpd %xmm1, %xmm1
3374 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
3375 ; SSE2-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3376 ; SSE2-NEXT: orpd %xmm1, %xmm0
3377 ; SSE2-NEXT: subpd %xmm1, %xmm0
3380 ; SSE41-LABEL: uitofp_load_2i32_to_2f64:
3382 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
3383 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3384 ; SSE41-NEXT: por %xmm1, %xmm0
3385 ; SSE41-NEXT: subpd %xmm1, %xmm0
3388 ; VEX-LABEL: uitofp_load_2i32_to_2f64:
3390 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
3391 ; VEX-NEXT: vmovdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3392 ; VEX-NEXT: vpor %xmm1, %xmm0, %xmm0
3393 ; VEX-NEXT: vsubpd %xmm1, %xmm0, %xmm0
3396 ; AVX512F-LABEL: uitofp_load_2i32_to_2f64:
3398 ; AVX512F-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3399 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3400 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3401 ; AVX512F-NEXT: vzeroupper
3402 ; AVX512F-NEXT: retq
3404 ; AVX512VL-LABEL: uitofp_load_2i32_to_2f64:
3405 ; AVX512VL: # %bb.0:
3406 ; AVX512VL-NEXT: vcvtudq2pd (%rdi), %xmm0
3407 ; AVX512VL-NEXT: retq
3409 ; AVX512DQ-LABEL: uitofp_load_2i32_to_2f64:
3410 ; AVX512DQ: # %bb.0:
3411 ; AVX512DQ-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3412 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3413 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3414 ; AVX512DQ-NEXT: vzeroupper
3415 ; AVX512DQ-NEXT: retq
3417 ; AVX512VLDQ-LABEL: uitofp_load_2i32_to_2f64:
3418 ; AVX512VLDQ: # %bb.0:
3419 ; AVX512VLDQ-NEXT: vcvtudq2pd (%rdi), %xmm0
3420 ; AVX512VLDQ-NEXT: retq
3421 %ld = load <2 x i32>, <2 x i32> *%a
3422 %cvt = uitofp <2 x i32> %ld to <2 x double>
3423 ret <2 x double> %cvt
3426 define <2 x double> @uitofp_load_4i32_to_2f64_2(<4 x i32>* %x) {
3427 ; SSE2-LABEL: uitofp_load_4i32_to_2f64_2:
3429 ; SSE2-NEXT: movapd (%rdi), %xmm0
3430 ; SSE2-NEXT: xorpd %xmm1, %xmm1
3431 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
3432 ; SSE2-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3433 ; SSE2-NEXT: orpd %xmm1, %xmm0
3434 ; SSE2-NEXT: subpd %xmm1, %xmm0
3437 ; SSE41-LABEL: uitofp_load_4i32_to_2f64_2:
3439 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
3440 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3441 ; SSE41-NEXT: por %xmm1, %xmm0
3442 ; SSE41-NEXT: subpd %xmm1, %xmm0
3445 ; AVX1-LABEL: uitofp_load_4i32_to_2f64_2:
3447 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
3448 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3449 ; AVX1-NEXT: # xmm1 = mem[0,0]
3450 ; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
3451 ; AVX1-NEXT: vsubpd %xmm1, %xmm0, %xmm0
3454 ; AVX2-LABEL: uitofp_load_4i32_to_2f64_2:
3456 ; AVX2-NEXT: vpmovzxdq {{.*#+}} ymm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3457 ; AVX2-NEXT: vpbroadcastq {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3458 ; AVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
3459 ; AVX2-NEXT: vsubpd %xmm1, %xmm0, %xmm0
3460 ; AVX2-NEXT: vzeroupper
3463 ; AVX512F-LABEL: uitofp_load_4i32_to_2f64_2:
3465 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
3466 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3467 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3468 ; AVX512F-NEXT: vzeroupper
3469 ; AVX512F-NEXT: retq
3471 ; AVX512VL-LABEL: uitofp_load_4i32_to_2f64_2:
3472 ; AVX512VL: # %bb.0:
3473 ; AVX512VL-NEXT: vcvtudq2pd (%rdi), %xmm0
3474 ; AVX512VL-NEXT: retq
3476 ; AVX512DQ-LABEL: uitofp_load_4i32_to_2f64_2:
3477 ; AVX512DQ: # %bb.0:
3478 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3479 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3480 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3481 ; AVX512DQ-NEXT: vzeroupper
3482 ; AVX512DQ-NEXT: retq
3484 ; AVX512VLDQ-LABEL: uitofp_load_4i32_to_2f64_2:
3485 ; AVX512VLDQ: # %bb.0:
3486 ; AVX512VLDQ-NEXT: vcvtudq2pd (%rdi), %xmm0
3487 ; AVX512VLDQ-NEXT: retq
3488 %a = load <4 x i32>, <4 x i32>* %x
3489 %b = uitofp <4 x i32> %a to <4 x double>
3490 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3494 define <2 x double> @uitofp_volatile_load_4i32_to_2f64_2(<4 x i32>* %x) {
3495 ; SSE2-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3497 ; SSE2-NEXT: movapd (%rdi), %xmm0
3498 ; SSE2-NEXT: xorpd %xmm1, %xmm1
3499 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
3500 ; SSE2-NEXT: movapd {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3501 ; SSE2-NEXT: orpd %xmm1, %xmm0
3502 ; SSE2-NEXT: subpd %xmm1, %xmm0
3505 ; SSE41-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3507 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
3508 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3509 ; SSE41-NEXT: por %xmm1, %xmm0
3510 ; SSE41-NEXT: subpd %xmm1, %xmm0
3513 ; AVX1-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3515 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
3516 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3517 ; AVX1-NEXT: # xmm1 = mem[0,0]
3518 ; AVX1-NEXT: vpor %xmm1, %xmm0, %xmm0
3519 ; AVX1-NEXT: vsubpd %xmm1, %xmm0, %xmm0
3522 ; AVX2-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3524 ; AVX2-NEXT: vpmovzxdq {{.*#+}} ymm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3525 ; AVX2-NEXT: vpbroadcastq {{.*#+}} xmm1 = [4.503599627370496E+15,4.503599627370496E+15]
3526 ; AVX2-NEXT: vpor %xmm1, %xmm0, %xmm0
3527 ; AVX2-NEXT: vsubpd %xmm1, %xmm0, %xmm0
3528 ; AVX2-NEXT: vzeroupper
3531 ; AVX512F-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3533 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
3534 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3535 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3536 ; AVX512F-NEXT: vzeroupper
3537 ; AVX512F-NEXT: retq
3539 ; AVX512VL-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3540 ; AVX512VL: # %bb.0:
3541 ; AVX512VL-NEXT: vmovaps (%rdi), %xmm0
3542 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
3543 ; AVX512VL-NEXT: retq
3545 ; AVX512DQ-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3546 ; AVX512DQ: # %bb.0:
3547 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3548 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3549 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3550 ; AVX512DQ-NEXT: vzeroupper
3551 ; AVX512DQ-NEXT: retq
3553 ; AVX512VLDQ-LABEL: uitofp_volatile_load_4i32_to_2f64_2:
3554 ; AVX512VLDQ: # %bb.0:
3555 ; AVX512VLDQ-NEXT: vmovaps (%rdi), %xmm0
3556 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
3557 ; AVX512VLDQ-NEXT: retq
3558 %a = load volatile <4 x i32>, <4 x i32>* %x
3559 %b = uitofp <4 x i32> %a to <4 x double>
3560 %c = shufflevector <4 x double> %b, <4 x double> undef, <2 x i32> <i32 0, i32 1>
3564 define <2 x double> @uitofp_load_2i16_to_2f64(<2 x i16> *%a) {
3565 ; SSE2-LABEL: uitofp_load_2i16_to_2f64:
3567 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3568 ; SSE2-NEXT: pxor %xmm1, %xmm1
3569 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
3570 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3573 ; SSE41-LABEL: uitofp_load_2i16_to_2f64:
3575 ; SSE41-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3576 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
3577 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3580 ; AVX-LABEL: uitofp_load_2i16_to_2f64:
3582 ; AVX-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
3583 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero,xmm0[2],zero,xmm0[3],zero
3584 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3586 %ld = load <2 x i16>, <2 x i16> *%a
3587 %cvt = uitofp <2 x i16> %ld to <2 x double>
3588 ret <2 x double> %cvt
3591 define <2 x double> @uitofp_load_2i8_to_2f64(<2 x i8> *%a) {
3592 ; SSE2-LABEL: uitofp_load_2i8_to_2f64:
3594 ; SSE2-NEXT: movzwl (%rdi), %eax
3595 ; SSE2-NEXT: movd %eax, %xmm0
3596 ; SSE2-NEXT: pxor %xmm1, %xmm1
3597 ; 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]
3598 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
3599 ; SSE2-NEXT: cvtdq2pd %xmm0, %xmm0
3602 ; SSE41-LABEL: uitofp_load_2i8_to_2f64:
3604 ; SSE41-NEXT: movzwl (%rdi), %eax
3605 ; SSE41-NEXT: movd %eax, %xmm0
3606 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
3607 ; SSE41-NEXT: cvtdq2pd %xmm0, %xmm0
3610 ; AVX-LABEL: uitofp_load_2i8_to_2f64:
3612 ; AVX-NEXT: movzwl (%rdi), %eax
3613 ; AVX-NEXT: vmovd %eax, %xmm0
3614 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero
3615 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
3617 %ld = load <2 x i8>, <2 x i8> *%a
3618 %cvt = uitofp <2 x i8> %ld to <2 x double>
3619 ret <2 x double> %cvt
3622 define <4 x double> @uitofp_load_4i64_to_4f64(<4 x i64> *%a) {
3623 ; SSE2-LABEL: uitofp_load_4i64_to_4f64:
3625 ; SSE2-NEXT: movdqa (%rdi), %xmm0
3626 ; SSE2-NEXT: movdqa 16(%rdi), %xmm1
3627 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [4294967295,4294967295]
3628 ; SSE2-NEXT: movdqa %xmm0, %xmm3
3629 ; SSE2-NEXT: pand %xmm2, %xmm3
3630 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
3631 ; SSE2-NEXT: por %xmm4, %xmm3
3632 ; SSE2-NEXT: psrlq $32, %xmm0
3633 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
3634 ; SSE2-NEXT: por %xmm5, %xmm0
3635 ; SSE2-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
3636 ; SSE2-NEXT: subpd %xmm6, %xmm0
3637 ; SSE2-NEXT: addpd %xmm3, %xmm0
3638 ; SSE2-NEXT: pand %xmm1, %xmm2
3639 ; SSE2-NEXT: por %xmm4, %xmm2
3640 ; SSE2-NEXT: psrlq $32, %xmm1
3641 ; SSE2-NEXT: por %xmm5, %xmm1
3642 ; SSE2-NEXT: subpd %xmm6, %xmm1
3643 ; SSE2-NEXT: addpd %xmm2, %xmm1
3646 ; SSE41-LABEL: uitofp_load_4i64_to_4f64:
3648 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3649 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
3650 ; SSE41-NEXT: pxor %xmm2, %xmm2
3651 ; SSE41-NEXT: movdqa %xmm0, %xmm3
3652 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3],xmm3[4,5],xmm2[6,7]
3653 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
3654 ; SSE41-NEXT: por %xmm4, %xmm3
3655 ; SSE41-NEXT: psrlq $32, %xmm0
3656 ; SSE41-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
3657 ; SSE41-NEXT: por %xmm5, %xmm0
3658 ; SSE41-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
3659 ; SSE41-NEXT: subpd %xmm6, %xmm0
3660 ; SSE41-NEXT: addpd %xmm3, %xmm0
3661 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
3662 ; SSE41-NEXT: por %xmm4, %xmm2
3663 ; SSE41-NEXT: psrlq $32, %xmm1
3664 ; SSE41-NEXT: por %xmm5, %xmm1
3665 ; SSE41-NEXT: subpd %xmm6, %xmm1
3666 ; SSE41-NEXT: addpd %xmm2, %xmm1
3669 ; AVX1-LABEL: uitofp_load_4i64_to_4f64:
3671 ; AVX1-NEXT: vmovaps (%rdi), %ymm0
3672 ; AVX1-NEXT: vxorps %xmm1, %xmm1, %xmm1
3673 ; AVX1-NEXT: vblendps {{.*#+}} ymm2 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
3674 ; AVX1-NEXT: vorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm2
3675 ; AVX1-NEXT: vshufps {{.*#+}} ymm0 = ymm1[1,3],ymm0[1,3],ymm1[5,7],ymm0[5,7]
3676 ; AVX1-NEXT: vpermilps {{.*#+}} ymm0 = ymm0[2,0,3,1,6,4,7,5]
3677 ; AVX1-NEXT: vorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3678 ; AVX1-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3679 ; AVX1-NEXT: vaddpd %ymm0, %ymm2, %ymm0
3682 ; AVX2-LABEL: uitofp_load_4i64_to_4f64:
3684 ; AVX2-NEXT: vmovdqa (%rdi), %ymm0
3685 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3686 ; AVX2-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
3687 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
3688 ; AVX2-NEXT: vpor %ymm2, %ymm1, %ymm1
3689 ; AVX2-NEXT: vpsrlq $32, %ymm0, %ymm0
3690 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
3691 ; AVX2-NEXT: vpor %ymm2, %ymm0, %ymm0
3692 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
3693 ; AVX2-NEXT: vsubpd %ymm2, %ymm0, %ymm0
3694 ; AVX2-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3697 ; AVX512F-LABEL: uitofp_load_4i64_to_4f64:
3699 ; AVX512F-NEXT: vmovdqa (%rdi), %ymm0
3700 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
3701 ; AVX512F-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
3702 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4841369599423283200,4841369599423283200,4841369599423283200,4841369599423283200]
3703 ; AVX512F-NEXT: vpor %ymm2, %ymm1, %ymm1
3704 ; AVX512F-NEXT: vpsrlq $32, %ymm0, %ymm0
3705 ; AVX512F-NEXT: vpbroadcastq {{.*#+}} ymm2 = [4985484787499139072,4985484787499139072,4985484787499139072,4985484787499139072]
3706 ; AVX512F-NEXT: vpor %ymm2, %ymm0, %ymm0
3707 ; AVX512F-NEXT: vbroadcastsd {{.*#+}} ymm2 = [1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25,1.9342813118337666E+25]
3708 ; AVX512F-NEXT: vsubpd %ymm2, %ymm0, %ymm0
3709 ; AVX512F-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3710 ; AVX512F-NEXT: retq
3712 ; AVX512VL-LABEL: uitofp_load_4i64_to_4f64:
3713 ; AVX512VL: # %bb.0:
3714 ; AVX512VL-NEXT: vmovdqa (%rdi), %ymm0
3715 ; AVX512VL-NEXT: vpxor %xmm1, %xmm1, %xmm1
3716 ; AVX512VL-NEXT: vpblendd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
3717 ; AVX512VL-NEXT: vporq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm1, %ymm1
3718 ; AVX512VL-NEXT: vpsrlq $32, %ymm0, %ymm0
3719 ; AVX512VL-NEXT: vporq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %ymm0
3720 ; AVX512VL-NEXT: vsubpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to4}, %ymm0, %ymm0
3721 ; AVX512VL-NEXT: vaddpd %ymm0, %ymm1, %ymm0
3722 ; AVX512VL-NEXT: retq
3724 ; AVX512DQ-LABEL: uitofp_load_4i64_to_4f64:
3725 ; AVX512DQ: # %bb.0:
3726 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
3727 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
3728 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3729 ; AVX512DQ-NEXT: retq
3731 ; AVX512VLDQ-LABEL: uitofp_load_4i64_to_4f64:
3732 ; AVX512VLDQ: # %bb.0:
3733 ; AVX512VLDQ-NEXT: vcvtuqq2pd (%rdi), %ymm0
3734 ; AVX512VLDQ-NEXT: retq
3735 %ld = load <4 x i64>, <4 x i64> *%a
3736 %cvt = uitofp <4 x i64> %ld to <4 x double>
3737 ret <4 x double> %cvt
3740 define <4 x double> @uitofp_load_4i32_to_4f64(<4 x i32> *%a) {
3741 ; SSE2-LABEL: uitofp_load_4i32_to_4f64:
3743 ; SSE2-NEXT: movapd (%rdi), %xmm1
3744 ; SSE2-NEXT: xorpd %xmm2, %xmm2
3745 ; SSE2-NEXT: movapd %xmm1, %xmm0
3746 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
3747 ; SSE2-NEXT: movapd {{.*#+}} xmm3 = [4.503599627370496E+15,4.503599627370496E+15]
3748 ; SSE2-NEXT: orpd %xmm3, %xmm0
3749 ; SSE2-NEXT: subpd %xmm3, %xmm0
3750 ; SSE2-NEXT: unpckhps {{.*#+}} xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3]
3751 ; SSE2-NEXT: orpd %xmm3, %xmm1
3752 ; SSE2-NEXT: subpd %xmm3, %xmm1
3755 ; SSE41-LABEL: uitofp_load_4i32_to_4f64:
3757 ; SSE41-NEXT: movdqa (%rdi), %xmm1
3758 ; SSE41-NEXT: pmovzxdq {{.*#+}} xmm0 = xmm1[0],zero,xmm1[1],zero
3759 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [4.503599627370496E+15,4.503599627370496E+15]
3760 ; SSE41-NEXT: por %xmm2, %xmm0
3761 ; SSE41-NEXT: subpd %xmm2, %xmm0
3762 ; SSE41-NEXT: pxor %xmm3, %xmm3
3763 ; SSE41-NEXT: punpckhdq {{.*#+}} xmm1 = xmm1[2],xmm3[2],xmm1[3],xmm3[3]
3764 ; SSE41-NEXT: por %xmm2, %xmm1
3765 ; SSE41-NEXT: subpd %xmm2, %xmm1
3768 ; AVX1-LABEL: uitofp_load_4i32_to_4f64:
3770 ; AVX1-NEXT: vmovdqa (%rdi), %xmm0
3771 ; AVX1-NEXT: vpxor %xmm1, %xmm1, %xmm1
3772 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
3773 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3774 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3775 ; AVX1-NEXT: vbroadcastsd {{.*#+}} ymm1 = [4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15]
3776 ; AVX1-NEXT: vorpd %ymm1, %ymm0, %ymm0
3777 ; AVX1-NEXT: vsubpd %ymm1, %ymm0, %ymm0
3780 ; AVX2-LABEL: uitofp_load_4i32_to_4f64:
3782 ; AVX2-NEXT: vpmovzxdq {{.*#+}} ymm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3783 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15,4.503599627370496E+15]
3784 ; AVX2-NEXT: vpor %ymm1, %ymm0, %ymm0
3785 ; AVX2-NEXT: vsubpd %ymm1, %ymm0, %ymm0
3788 ; AVX512F-LABEL: uitofp_load_4i32_to_4f64:
3790 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
3791 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
3792 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3793 ; AVX512F-NEXT: retq
3795 ; AVX512VL-LABEL: uitofp_load_4i32_to_4f64:
3796 ; AVX512VL: # %bb.0:
3797 ; AVX512VL-NEXT: vcvtudq2pd (%rdi), %ymm0
3798 ; AVX512VL-NEXT: retq
3800 ; AVX512DQ-LABEL: uitofp_load_4i32_to_4f64:
3801 ; AVX512DQ: # %bb.0:
3802 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
3803 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
3804 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3805 ; AVX512DQ-NEXT: retq
3807 ; AVX512VLDQ-LABEL: uitofp_load_4i32_to_4f64:
3808 ; AVX512VLDQ: # %bb.0:
3809 ; AVX512VLDQ-NEXT: vcvtudq2pd (%rdi), %ymm0
3810 ; AVX512VLDQ-NEXT: retq
3811 %ld = load <4 x i32>, <4 x i32> *%a
3812 %cvt = uitofp <4 x i32> %ld to <4 x double>
3813 ret <4 x double> %cvt
3816 define <4 x double> @uitofp_load_4i16_to_4f64(<4 x i16> *%a) {
3817 ; SSE2-LABEL: uitofp_load_4i16_to_4f64:
3819 ; SSE2-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
3820 ; SSE2-NEXT: pxor %xmm0, %xmm0
3821 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3822 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3823 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3824 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3827 ; SSE41-LABEL: uitofp_load_4i16_to_4f64:
3829 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3830 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3831 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3832 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3835 ; AVX-LABEL: uitofp_load_4i16_to_4f64:
3837 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
3838 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3840 %ld = load <4 x i16>, <4 x i16> *%a
3841 %cvt = uitofp <4 x i16> %ld to <4 x double>
3842 ret <4 x double> %cvt
3845 define <4 x double> @uitofp_load_4i8_to_4f64(<4 x i8> *%a) {
3846 ; SSE2-LABEL: uitofp_load_4i8_to_4f64:
3848 ; SSE2-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
3849 ; SSE2-NEXT: pxor %xmm0, %xmm0
3850 ; 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]
3851 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
3852 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm0
3853 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3854 ; SSE2-NEXT: cvtdq2pd %xmm1, %xmm1
3857 ; SSE41-LABEL: uitofp_load_4i8_to_4f64:
3859 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
3860 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm0
3861 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3862 ; SSE41-NEXT: cvtdq2pd %xmm1, %xmm1
3865 ; AVX-LABEL: uitofp_load_4i8_to_4f64:
3867 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
3868 ; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
3870 %ld = load <4 x i8>, <4 x i8> *%a
3871 %cvt = uitofp <4 x i8> %ld to <4 x double>
3872 ret <4 x double> %cvt
3876 ; Load Signed Integer to Float
3879 define <4 x float> @sitofp_load_4i64_to_4f32(<4 x i64> *%a) {
3880 ; SSE2-LABEL: sitofp_load_4i64_to_4f32:
3882 ; SSE2-NEXT: movdqa (%rdi), %xmm1
3883 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
3884 ; SSE2-NEXT: movq %xmm0, %rax
3885 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
3886 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
3887 ; SSE2-NEXT: movq %xmm0, %rax
3888 ; SSE2-NEXT: xorps %xmm0, %xmm0
3889 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
3890 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
3891 ; SSE2-NEXT: movq %xmm1, %rax
3892 ; SSE2-NEXT: xorps %xmm0, %xmm0
3893 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
3894 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
3895 ; SSE2-NEXT: movq %xmm1, %rax
3896 ; SSE2-NEXT: xorps %xmm1, %xmm1
3897 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
3898 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
3899 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
3902 ; SSE41-LABEL: sitofp_load_4i64_to_4f32:
3904 ; SSE41-NEXT: movdqa (%rdi), %xmm0
3905 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
3906 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
3907 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
3908 ; SSE41-NEXT: movq %xmm0, %rax
3909 ; SSE41-NEXT: xorps %xmm0, %xmm0
3910 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
3911 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
3912 ; SSE41-NEXT: movq %xmm1, %rax
3913 ; SSE41-NEXT: xorps %xmm2, %xmm2
3914 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
3915 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
3916 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
3917 ; SSE41-NEXT: xorps %xmm1, %xmm1
3918 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
3919 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
3922 ; VEX-LABEL: sitofp_load_4i64_to_4f32:
3924 ; VEX-NEXT: vmovdqa (%rdi), %xmm0
3925 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm1
3926 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
3927 ; VEX-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
3928 ; VEX-NEXT: vmovq %xmm0, %rax
3929 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
3930 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
3931 ; VEX-NEXT: vmovq %xmm1, %rax
3932 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
3933 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
3934 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
3935 ; VEX-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
3936 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
3939 ; AVX512F-LABEL: sitofp_load_4i64_to_4f32:
3941 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
3942 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
3943 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
3944 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
3945 ; AVX512F-NEXT: vmovq %xmm0, %rax
3946 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
3947 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
3948 ; AVX512F-NEXT: vmovq %xmm1, %rax
3949 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
3950 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
3951 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
3952 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
3953 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
3954 ; AVX512F-NEXT: retq
3956 ; AVX512VL-LABEL: sitofp_load_4i64_to_4f32:
3957 ; AVX512VL: # %bb.0:
3958 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
3959 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
3960 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
3961 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm2, %xmm2
3962 ; AVX512VL-NEXT: vmovq %xmm0, %rax
3963 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
3964 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
3965 ; AVX512VL-NEXT: vmovq %xmm1, %rax
3966 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
3967 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
3968 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
3969 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
3970 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
3971 ; AVX512VL-NEXT: retq
3973 ; AVX512DQ-LABEL: sitofp_load_4i64_to_4f32:
3974 ; AVX512DQ: # %bb.0:
3975 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
3976 ; AVX512DQ-NEXT: vcvtqq2ps %zmm0, %ymm0
3977 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
3978 ; AVX512DQ-NEXT: vzeroupper
3979 ; AVX512DQ-NEXT: retq
3981 ; AVX512VLDQ-LABEL: sitofp_load_4i64_to_4f32:
3982 ; AVX512VLDQ: # %bb.0:
3983 ; AVX512VLDQ-NEXT: vcvtqq2psy (%rdi), %xmm0
3984 ; AVX512VLDQ-NEXT: retq
3985 %ld = load <4 x i64>, <4 x i64> *%a
3986 %cvt = sitofp <4 x i64> %ld to <4 x float>
3987 ret <4 x float> %cvt
3990 define <4 x float> @sitofp_load_4i32_to_4f32(<4 x i32> *%a) {
3991 ; SSE-LABEL: sitofp_load_4i32_to_4f32:
3993 ; SSE-NEXT: cvtdq2ps (%rdi), %xmm0
3996 ; AVX-LABEL: sitofp_load_4i32_to_4f32:
3998 ; AVX-NEXT: vcvtdq2ps (%rdi), %xmm0
4000 %ld = load <4 x i32>, <4 x i32> *%a
4001 %cvt = sitofp <4 x i32> %ld to <4 x float>
4002 ret <4 x float> %cvt
4005 define <4 x float> @sitofp_load_4i16_to_4f32(<4 x i16> *%a) {
4006 ; SSE2-LABEL: sitofp_load_4i16_to_4f32:
4008 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
4009 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
4010 ; SSE2-NEXT: psrad $16, %xmm0
4011 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4014 ; SSE41-LABEL: sitofp_load_4i16_to_4f32:
4016 ; SSE41-NEXT: pmovsxwd (%rdi), %xmm0
4017 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4020 ; AVX-LABEL: sitofp_load_4i16_to_4f32:
4022 ; AVX-NEXT: vpmovsxwd (%rdi), %xmm0
4023 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4025 %ld = load <4 x i16>, <4 x i16> *%a
4026 %cvt = sitofp <4 x i16> %ld to <4 x float>
4027 ret <4 x float> %cvt
4030 define <4 x float> @sitofp_load_4i8_to_4f32(<4 x i8> *%a) {
4031 ; SSE2-LABEL: sitofp_load_4i8_to_4f32:
4033 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
4034 ; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
4035 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3]
4036 ; SSE2-NEXT: psrad $24, %xmm0
4037 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4040 ; SSE41-LABEL: sitofp_load_4i8_to_4f32:
4042 ; SSE41-NEXT: pmovsxbd (%rdi), %xmm0
4043 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4046 ; AVX-LABEL: sitofp_load_4i8_to_4f32:
4048 ; AVX-NEXT: vpmovsxbd (%rdi), %xmm0
4049 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4051 %ld = load <4 x i8>, <4 x i8> *%a
4052 %cvt = sitofp <4 x i8> %ld to <4 x float>
4053 ret <4 x float> %cvt
4056 define <8 x float> @sitofp_load_8i64_to_8f32(<8 x i64> *%a) {
4057 ; SSE2-LABEL: sitofp_load_8i64_to_8f32:
4059 ; SSE2-NEXT: movdqa (%rdi), %xmm1
4060 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4061 ; SSE2-NEXT: movdqa 32(%rdi), %xmm2
4062 ; SSE2-NEXT: movdqa 48(%rdi), %xmm3
4063 ; SSE2-NEXT: movq %xmm0, %rax
4064 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4065 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
4066 ; SSE2-NEXT: movq %xmm0, %rax
4067 ; SSE2-NEXT: xorps %xmm0, %xmm0
4068 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4069 ; SSE2-NEXT: unpcklps {{.*#+}} xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
4070 ; SSE2-NEXT: movq %xmm1, %rax
4071 ; SSE2-NEXT: xorps %xmm0, %xmm0
4072 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4073 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[2,3,2,3]
4074 ; SSE2-NEXT: movq %xmm1, %rax
4075 ; SSE2-NEXT: xorps %xmm1, %xmm1
4076 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4077 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
4078 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm4[0]
4079 ; SSE2-NEXT: movq %xmm3, %rax
4080 ; SSE2-NEXT: xorps %xmm4, %xmm4
4081 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4082 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm3[2,3,2,3]
4083 ; SSE2-NEXT: movq %xmm1, %rax
4084 ; SSE2-NEXT: xorps %xmm1, %xmm1
4085 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4086 ; SSE2-NEXT: unpcklps {{.*#+}} xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
4087 ; SSE2-NEXT: movq %xmm2, %rax
4088 ; SSE2-NEXT: xorps %xmm1, %xmm1
4089 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4090 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
4091 ; SSE2-NEXT: movq %xmm2, %rax
4092 ; SSE2-NEXT: xorps %xmm2, %xmm2
4093 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4094 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
4095 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm4[0]
4098 ; SSE41-LABEL: sitofp_load_8i64_to_8f32:
4100 ; SSE41-NEXT: movdqa (%rdi), %xmm0
4101 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
4102 ; SSE41-NEXT: movdqa 32(%rdi), %xmm2
4103 ; SSE41-NEXT: movdqa 48(%rdi), %xmm3
4104 ; SSE41-NEXT: pextrq $1, %xmm0, %rax
4105 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
4106 ; SSE41-NEXT: movq %xmm0, %rax
4107 ; SSE41-NEXT: xorps %xmm0, %xmm0
4108 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4109 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0],xmm4[0],xmm0[2,3]
4110 ; SSE41-NEXT: movq %xmm1, %rax
4111 ; SSE41-NEXT: xorps %xmm4, %xmm4
4112 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
4113 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1],xmm4[0],xmm0[3]
4114 ; SSE41-NEXT: pextrq $1, %xmm1, %rax
4115 ; SSE41-NEXT: xorps %xmm1, %xmm1
4116 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4117 ; SSE41-NEXT: insertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4118 ; SSE41-NEXT: pextrq $1, %xmm2, %rax
4119 ; SSE41-NEXT: xorps %xmm4, %xmm4
4120 ; SSE41-NEXT: cvtsi2ss %rax, %xmm4
4121 ; SSE41-NEXT: movq %xmm2, %rax
4122 ; SSE41-NEXT: xorps %xmm1, %xmm1
4123 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4124 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0],xmm4[0],xmm1[2,3]
4125 ; SSE41-NEXT: movq %xmm3, %rax
4126 ; SSE41-NEXT: xorps %xmm2, %xmm2
4127 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4128 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
4129 ; SSE41-NEXT: pextrq $1, %xmm3, %rax
4130 ; SSE41-NEXT: xorps %xmm2, %xmm2
4131 ; SSE41-NEXT: cvtsi2ss %rax, %xmm2
4132 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1,2],xmm2[0]
4135 ; VEX-LABEL: sitofp_load_8i64_to_8f32:
4137 ; VEX-NEXT: vmovaps (%rdi), %xmm0
4138 ; VEX-NEXT: vmovdqa 16(%rdi), %xmm1
4139 ; VEX-NEXT: vmovdqa 32(%rdi), %xmm2
4140 ; VEX-NEXT: vmovdqa 48(%rdi), %xmm3
4141 ; VEX-NEXT: vpextrq $1, %xmm2, %rax
4142 ; VEX-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
4143 ; VEX-NEXT: vmovq %xmm2, %rax
4144 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm2
4145 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
4146 ; VEX-NEXT: vmovq %xmm3, %rax
4147 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4148 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
4149 ; VEX-NEXT: vpextrq $1, %xmm3, %rax
4150 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4151 ; VEX-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
4152 ; VEX-NEXT: vpextrq $1, %xmm0, %rax
4153 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4154 ; VEX-NEXT: vmovq %xmm0, %rax
4155 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4156 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
4157 ; VEX-NEXT: vmovq %xmm1, %rax
4158 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4159 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
4160 ; VEX-NEXT: vpextrq $1, %xmm1, %rax
4161 ; VEX-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4162 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4163 ; VEX-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4166 ; AVX512F-LABEL: sitofp_load_8i64_to_8f32:
4168 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
4169 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
4170 ; AVX512F-NEXT: vmovdqa 32(%rdi), %xmm2
4171 ; AVX512F-NEXT: vmovdqa 48(%rdi), %xmm3
4172 ; AVX512F-NEXT: vpextrq $1, %xmm2, %rax
4173 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
4174 ; AVX512F-NEXT: vmovq %xmm2, %rax
4175 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm2
4176 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
4177 ; AVX512F-NEXT: vmovq %xmm3, %rax
4178 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4179 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
4180 ; AVX512F-NEXT: vpextrq $1, %xmm3, %rax
4181 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4182 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
4183 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
4184 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4185 ; AVX512F-NEXT: vmovq %xmm0, %rax
4186 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4187 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
4188 ; AVX512F-NEXT: vmovq %xmm1, %rax
4189 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4190 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
4191 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
4192 ; AVX512F-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4193 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4194 ; AVX512F-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4195 ; AVX512F-NEXT: retq
4197 ; AVX512VL-LABEL: sitofp_load_8i64_to_8f32:
4198 ; AVX512VL: # %bb.0:
4199 ; AVX512VL-NEXT: vmovaps (%rdi), %xmm0
4200 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
4201 ; AVX512VL-NEXT: vmovdqa 32(%rdi), %xmm2
4202 ; AVX512VL-NEXT: vmovdqa 48(%rdi), %xmm3
4203 ; AVX512VL-NEXT: vpextrq $1, %xmm2, %rax
4204 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm4, %xmm4
4205 ; AVX512VL-NEXT: vmovq %xmm2, %rax
4206 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm2
4207 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
4208 ; AVX512VL-NEXT: vmovq %xmm3, %rax
4209 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4210 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
4211 ; AVX512VL-NEXT: vpextrq $1, %xmm3, %rax
4212 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4213 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
4214 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
4215 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4216 ; AVX512VL-NEXT: vmovq %xmm0, %rax
4217 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4218 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
4219 ; AVX512VL-NEXT: vmovq %xmm1, %rax
4220 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4221 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
4222 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
4223 ; AVX512VL-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4224 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4225 ; AVX512VL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
4226 ; AVX512VL-NEXT: retq
4228 ; AVX512DQ-LABEL: sitofp_load_8i64_to_8f32:
4229 ; AVX512DQ: # %bb.0:
4230 ; AVX512DQ-NEXT: vcvtqq2ps (%rdi), %ymm0
4231 ; AVX512DQ-NEXT: retq
4233 ; AVX512VLDQ-LABEL: sitofp_load_8i64_to_8f32:
4234 ; AVX512VLDQ: # %bb.0:
4235 ; AVX512VLDQ-NEXT: vcvtqq2ps (%rdi), %ymm0
4236 ; AVX512VLDQ-NEXT: retq
4237 %ld = load <8 x i64>, <8 x i64> *%a
4238 %cvt = sitofp <8 x i64> %ld to <8 x float>
4239 ret <8 x float> %cvt
4242 define <8 x float> @sitofp_load_8i32_to_8f32(<8 x i32> *%a) {
4243 ; SSE-LABEL: sitofp_load_8i32_to_8f32:
4245 ; SSE-NEXT: cvtdq2ps (%rdi), %xmm0
4246 ; SSE-NEXT: cvtdq2ps 16(%rdi), %xmm1
4249 ; AVX-LABEL: sitofp_load_8i32_to_8f32:
4251 ; AVX-NEXT: vcvtdq2ps (%rdi), %ymm0
4253 %ld = load <8 x i32>, <8 x i32> *%a
4254 %cvt = sitofp <8 x i32> %ld to <8 x float>
4255 ret <8 x float> %cvt
4258 define <8 x float> @sitofp_load_8i16_to_8f32(<8 x i16> *%a) {
4259 ; SSE2-LABEL: sitofp_load_8i16_to_8f32:
4261 ; SSE2-NEXT: movdqa (%rdi), %xmm1
4262 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4263 ; SSE2-NEXT: psrad $16, %xmm0
4264 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4265 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4,4,5,5,6,6,7,7]
4266 ; SSE2-NEXT: psrad $16, %xmm1
4267 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
4270 ; SSE41-LABEL: sitofp_load_8i16_to_8f32:
4272 ; SSE41-NEXT: pmovsxwd 8(%rdi), %xmm1
4273 ; SSE41-NEXT: pmovsxwd (%rdi), %xmm0
4274 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4275 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
4278 ; AVX1-LABEL: sitofp_load_8i16_to_8f32:
4280 ; AVX1-NEXT: vpmovsxwd 8(%rdi), %xmm0
4281 ; AVX1-NEXT: vpmovsxwd (%rdi), %xmm1
4282 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4283 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
4286 ; AVX2-LABEL: sitofp_load_8i16_to_8f32:
4288 ; AVX2-NEXT: vpmovsxwd (%rdi), %ymm0
4289 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
4292 ; AVX512-LABEL: sitofp_load_8i16_to_8f32:
4294 ; AVX512-NEXT: vpmovsxwd (%rdi), %ymm0
4295 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
4297 %ld = load <8 x i16>, <8 x i16> *%a
4298 %cvt = sitofp <8 x i16> %ld to <8 x float>
4299 ret <8 x float> %cvt
4302 define <8 x float> @sitofp_load_8i8_to_8f32(<8 x i8> *%a) {
4303 ; SSE2-LABEL: sitofp_load_8i8_to_8f32:
4305 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
4306 ; 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]
4307 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4308 ; SSE2-NEXT: psrad $24, %xmm0
4309 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4310 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4,4,5,5,6,6,7,7]
4311 ; SSE2-NEXT: psrad $24, %xmm1
4312 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
4315 ; SSE41-LABEL: sitofp_load_8i8_to_8f32:
4317 ; SSE41-NEXT: pmovsxbd 4(%rdi), %xmm1
4318 ; SSE41-NEXT: pmovsxbd (%rdi), %xmm0
4319 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4320 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
4323 ; AVX1-LABEL: sitofp_load_8i8_to_8f32:
4325 ; AVX1-NEXT: vpmovsxbd 4(%rdi), %xmm0
4326 ; AVX1-NEXT: vpmovsxbd (%rdi), %xmm1
4327 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4328 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
4331 ; AVX2-LABEL: sitofp_load_8i8_to_8f32:
4333 ; AVX2-NEXT: vpmovsxbd (%rdi), %ymm0
4334 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
4337 ; AVX512-LABEL: sitofp_load_8i8_to_8f32:
4339 ; AVX512-NEXT: vpmovsxbd (%rdi), %ymm0
4340 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
4342 %ld = load <8 x i8>, <8 x i8> *%a
4343 %cvt = sitofp <8 x i8> %ld to <8 x float>
4344 ret <8 x float> %cvt
4348 ; Load Unsigned Integer to Float
4351 define <4 x float> @uitofp_load_4i64_to_4f32(<4 x i64> *%a) {
4352 ; SSE2-LABEL: uitofp_load_4i64_to_4f32:
4354 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4355 ; SSE2-NEXT: movq %xmm0, %rax
4356 ; SSE2-NEXT: testq %rax, %rax
4357 ; SSE2-NEXT: js .LBB83_1
4358 ; SSE2-NEXT: # %bb.2:
4359 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4360 ; SSE2-NEXT: jmp .LBB83_3
4361 ; SSE2-NEXT: .LBB83_1:
4362 ; SSE2-NEXT: movq %rax, %rcx
4363 ; SSE2-NEXT: shrq %rcx
4364 ; SSE2-NEXT: andl $1, %eax
4365 ; SSE2-NEXT: orq %rcx, %rax
4366 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4367 ; SSE2-NEXT: addss %xmm1, %xmm1
4368 ; SSE2-NEXT: .LBB83_3:
4369 ; SSE2-NEXT: movdqa (%rdi), %xmm2
4370 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
4371 ; SSE2-NEXT: movq %xmm0, %rax
4372 ; SSE2-NEXT: testq %rax, %rax
4373 ; SSE2-NEXT: js .LBB83_4
4374 ; SSE2-NEXT: # %bb.5:
4375 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4376 ; SSE2-NEXT: jmp .LBB83_6
4377 ; SSE2-NEXT: .LBB83_4:
4378 ; SSE2-NEXT: movq %rax, %rcx
4379 ; SSE2-NEXT: shrq %rcx
4380 ; SSE2-NEXT: andl $1, %eax
4381 ; SSE2-NEXT: orq %rcx, %rax
4382 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4383 ; SSE2-NEXT: addss %xmm3, %xmm3
4384 ; SSE2-NEXT: .LBB83_6:
4385 ; SSE2-NEXT: movq %xmm2, %rax
4386 ; SSE2-NEXT: testq %rax, %rax
4387 ; SSE2-NEXT: js .LBB83_7
4388 ; SSE2-NEXT: # %bb.8:
4389 ; SSE2-NEXT: xorps %xmm0, %xmm0
4390 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4391 ; SSE2-NEXT: jmp .LBB83_9
4392 ; SSE2-NEXT: .LBB83_7:
4393 ; SSE2-NEXT: movq %rax, %rcx
4394 ; SSE2-NEXT: shrq %rcx
4395 ; SSE2-NEXT: andl $1, %eax
4396 ; SSE2-NEXT: orq %rcx, %rax
4397 ; SSE2-NEXT: xorps %xmm0, %xmm0
4398 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4399 ; SSE2-NEXT: addss %xmm0, %xmm0
4400 ; SSE2-NEXT: .LBB83_9:
4401 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
4402 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[2,3,2,3]
4403 ; SSE2-NEXT: movq %xmm2, %rax
4404 ; SSE2-NEXT: testq %rax, %rax
4405 ; SSE2-NEXT: js .LBB83_10
4406 ; SSE2-NEXT: # %bb.11:
4407 ; SSE2-NEXT: xorps %xmm2, %xmm2
4408 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4409 ; SSE2-NEXT: jmp .LBB83_12
4410 ; SSE2-NEXT: .LBB83_10:
4411 ; SSE2-NEXT: movq %rax, %rcx
4412 ; SSE2-NEXT: shrq %rcx
4413 ; SSE2-NEXT: andl $1, %eax
4414 ; SSE2-NEXT: orq %rcx, %rax
4415 ; SSE2-NEXT: xorps %xmm2, %xmm2
4416 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4417 ; SSE2-NEXT: addss %xmm2, %xmm2
4418 ; SSE2-NEXT: .LBB83_12:
4419 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
4420 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
4423 ; SSE41-LABEL: uitofp_load_4i64_to_4f32:
4425 ; SSE41-NEXT: movdqa (%rdi), %xmm1
4426 ; SSE41-NEXT: movdqa 16(%rdi), %xmm2
4427 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [1,1]
4428 ; SSE41-NEXT: movdqa %xmm1, %xmm0
4429 ; SSE41-NEXT: pand %xmm4, %xmm0
4430 ; SSE41-NEXT: movdqa %xmm1, %xmm3
4431 ; SSE41-NEXT: psrlq $1, %xmm3
4432 ; SSE41-NEXT: por %xmm0, %xmm3
4433 ; SSE41-NEXT: movdqa %xmm1, %xmm5
4434 ; SSE41-NEXT: movdqa %xmm1, %xmm0
4435 ; SSE41-NEXT: blendvpd %xmm0, %xmm3, %xmm5
4436 ; SSE41-NEXT: pextrq $1, %xmm5, %rax
4437 ; SSE41-NEXT: xorps %xmm0, %xmm0
4438 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4439 ; SSE41-NEXT: movq %xmm5, %rax
4440 ; SSE41-NEXT: xorps %xmm3, %xmm3
4441 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
4442 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[2,3]
4443 ; SSE41-NEXT: pand %xmm2, %xmm4
4444 ; SSE41-NEXT: movdqa %xmm2, %xmm5
4445 ; SSE41-NEXT: psrlq $1, %xmm5
4446 ; SSE41-NEXT: por %xmm4, %xmm5
4447 ; SSE41-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,3],xmm2[1,3]
4448 ; SSE41-NEXT: movaps %xmm2, %xmm0
4449 ; SSE41-NEXT: blendvpd %xmm0, %xmm5, %xmm2
4450 ; SSE41-NEXT: movq %xmm2, %rax
4451 ; SSE41-NEXT: xorps %xmm0, %xmm0
4452 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4453 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0,1],xmm0[0],xmm3[3]
4454 ; SSE41-NEXT: pextrq $1, %xmm2, %rax
4455 ; SSE41-NEXT: xorps %xmm0, %xmm0
4456 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4457 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0,1,2],xmm0[0]
4458 ; SSE41-NEXT: movaps %xmm3, %xmm2
4459 ; SSE41-NEXT: addps %xmm3, %xmm2
4460 ; SSE41-NEXT: movaps %xmm1, %xmm0
4461 ; SSE41-NEXT: blendvps %xmm0, %xmm2, %xmm3
4462 ; SSE41-NEXT: movaps %xmm3, %xmm0
4465 ; AVX1-LABEL: uitofp_load_4i64_to_4f32:
4467 ; AVX1-NEXT: vmovapd (%rdi), %ymm0
4468 ; AVX1-NEXT: vmovdqa (%rdi), %xmm1
4469 ; AVX1-NEXT: vmovdqa 16(%rdi), %xmm2
4470 ; AVX1-NEXT: vpsrlq $1, %xmm1, %xmm3
4471 ; AVX1-NEXT: vpsrlq $1, %xmm2, %xmm4
4472 ; AVX1-NEXT: vinsertf128 $1, %xmm4, %ymm3, %ymm3
4473 ; AVX1-NEXT: vandpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm4
4474 ; AVX1-NEXT: vorpd %ymm4, %ymm3, %ymm3
4475 ; AVX1-NEXT: vblendvpd %ymm0, %ymm3, %ymm0, %ymm0
4476 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
4477 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4478 ; AVX1-NEXT: vmovq %xmm0, %rax
4479 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4480 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm4[0],xmm3[0],xmm4[2,3]
4481 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4482 ; AVX1-NEXT: vmovq %xmm0, %rax
4483 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4484 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm3[0,1],xmm4[0],xmm3[3]
4485 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
4486 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm5, %xmm0
4487 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm3[0,1,2],xmm0[0]
4488 ; AVX1-NEXT: vaddps %xmm0, %xmm0, %xmm3
4489 ; AVX1-NEXT: vpackssdw %xmm2, %xmm1, %xmm1
4490 ; AVX1-NEXT: vblendvps %xmm1, %xmm3, %xmm0, %xmm0
4491 ; AVX1-NEXT: vzeroupper
4494 ; AVX2-LABEL: uitofp_load_4i64_to_4f32:
4496 ; AVX2-NEXT: vmovdqa (%rdi), %ymm0
4497 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [1,1,1,1]
4498 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm1
4499 ; AVX2-NEXT: vpsrlq $1, %ymm0, %ymm2
4500 ; AVX2-NEXT: vpor %ymm1, %ymm2, %ymm1
4501 ; AVX2-NEXT: vblendvpd %ymm0, %ymm1, %ymm0, %ymm0
4502 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
4503 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm1
4504 ; AVX2-NEXT: vmovq %xmm0, %rax
4505 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4506 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm2[0],xmm1[0],xmm2[2,3]
4507 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm0
4508 ; AVX2-NEXT: vmovq %xmm0, %rax
4509 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm2
4510 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
4511 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
4512 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm3, %xmm0
4513 ; AVX2-NEXT: vinsertps {{.*#+}} xmm0 = xmm1[0,1,2],xmm0[0]
4514 ; AVX2-NEXT: vaddps %xmm0, %xmm0, %xmm1
4515 ; AVX2-NEXT: vmovdqa (%rdi), %xmm2
4516 ; AVX2-NEXT: vpackssdw 16(%rdi), %xmm2, %xmm2
4517 ; AVX2-NEXT: vblendvps %xmm2, %xmm1, %xmm0, %xmm0
4518 ; AVX2-NEXT: vzeroupper
4521 ; AVX512F-LABEL: uitofp_load_4i64_to_4f32:
4523 ; AVX512F-NEXT: vmovdqa (%rdi), %xmm0
4524 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
4525 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
4526 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
4527 ; AVX512F-NEXT: vmovq %xmm0, %rax
4528 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
4529 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4530 ; AVX512F-NEXT: vmovq %xmm1, %rax
4531 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
4532 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4533 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
4534 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm3, %xmm1
4535 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4536 ; AVX512F-NEXT: retq
4538 ; AVX512VL-LABEL: uitofp_load_4i64_to_4f32:
4539 ; AVX512VL: # %bb.0:
4540 ; AVX512VL-NEXT: vmovdqa (%rdi), %xmm0
4541 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
4542 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
4543 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm2, %xmm2
4544 ; AVX512VL-NEXT: vmovq %xmm0, %rax
4545 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm0
4546 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[2,3]
4547 ; AVX512VL-NEXT: vmovq %xmm1, %rax
4548 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm2
4549 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
4550 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
4551 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm3, %xmm1
4552 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
4553 ; AVX512VL-NEXT: retq
4555 ; AVX512DQ-LABEL: uitofp_load_4i64_to_4f32:
4556 ; AVX512DQ: # %bb.0:
4557 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
4558 ; AVX512DQ-NEXT: vcvtuqq2ps %zmm0, %ymm0
4559 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
4560 ; AVX512DQ-NEXT: vzeroupper
4561 ; AVX512DQ-NEXT: retq
4563 ; AVX512VLDQ-LABEL: uitofp_load_4i64_to_4f32:
4564 ; AVX512VLDQ: # %bb.0:
4565 ; AVX512VLDQ-NEXT: vcvtuqq2psy (%rdi), %xmm0
4566 ; AVX512VLDQ-NEXT: retq
4567 %ld = load <4 x i64>, <4 x i64> *%a
4568 %cvt = uitofp <4 x i64> %ld to <4 x float>
4569 ret <4 x float> %cvt
4572 define <4 x float> @uitofp_load_4i32_to_4f32(<4 x i32> *%a) {
4573 ; SSE2-LABEL: uitofp_load_4i32_to_4f32:
4575 ; SSE2-NEXT: movdqa (%rdi), %xmm0
4576 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [65535,65535,65535,65535]
4577 ; SSE2-NEXT: pand %xmm0, %xmm1
4578 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm1
4579 ; SSE2-NEXT: psrld $16, %xmm0
4580 ; SSE2-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4581 ; SSE2-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4582 ; SSE2-NEXT: addps %xmm1, %xmm0
4585 ; SSE41-LABEL: uitofp_load_4i32_to_4f32:
4587 ; SSE41-NEXT: movdqa (%rdi), %xmm0
4588 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
4589 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
4590 ; SSE41-NEXT: psrld $16, %xmm0
4591 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
4592 ; SSE41-NEXT: subps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
4593 ; SSE41-NEXT: addps %xmm1, %xmm0
4596 ; AVX1-LABEL: uitofp_load_4i32_to_4f32:
4598 ; AVX1-NEXT: vmovdqa (%rdi), %xmm0
4599 ; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
4600 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm0
4601 ; AVX1-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3],xmm0[4],mem[5],xmm0[6],mem[7]
4602 ; AVX1-NEXT: vsubps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm0
4603 ; AVX1-NEXT: vaddps %xmm0, %xmm1, %xmm0
4606 ; AVX2-LABEL: uitofp_load_4i32_to_4f32:
4608 ; AVX2-NEXT: vmovdqa (%rdi), %xmm0
4609 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm1 = [1258291200,1258291200,1258291200,1258291200]
4610 ; AVX2-NEXT: vpblendw {{.*#+}} xmm1 = xmm0[0],xmm1[1],xmm0[2],xmm1[3],xmm0[4],xmm1[5],xmm0[6],xmm1[7]
4611 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm0
4612 ; AVX2-NEXT: vpbroadcastd {{.*#+}} xmm2 = [1392508928,1392508928,1392508928,1392508928]
4613 ; AVX2-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],xmm2[1],xmm0[2],xmm2[3],xmm0[4],xmm2[5],xmm0[6],xmm2[7]
4614 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm2 = [5.49764202E+11,5.49764202E+11,5.49764202E+11,5.49764202E+11]
4615 ; AVX2-NEXT: vsubps %xmm2, %xmm0, %xmm0
4616 ; AVX2-NEXT: vaddps %xmm0, %xmm1, %xmm0
4619 ; AVX512F-LABEL: uitofp_load_4i32_to_4f32:
4621 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
4622 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
4623 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4624 ; AVX512F-NEXT: vzeroupper
4625 ; AVX512F-NEXT: retq
4627 ; AVX512VL-LABEL: uitofp_load_4i32_to_4f32:
4628 ; AVX512VL: # %bb.0:
4629 ; AVX512VL-NEXT: vcvtudq2ps (%rdi), %xmm0
4630 ; AVX512VL-NEXT: retq
4632 ; AVX512DQ-LABEL: uitofp_load_4i32_to_4f32:
4633 ; AVX512DQ: # %bb.0:
4634 ; AVX512DQ-NEXT: vmovaps (%rdi), %xmm0
4635 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
4636 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
4637 ; AVX512DQ-NEXT: vzeroupper
4638 ; AVX512DQ-NEXT: retq
4640 ; AVX512VLDQ-LABEL: uitofp_load_4i32_to_4f32:
4641 ; AVX512VLDQ: # %bb.0:
4642 ; AVX512VLDQ-NEXT: vcvtudq2ps (%rdi), %xmm0
4643 ; AVX512VLDQ-NEXT: retq
4644 %ld = load <4 x i32>, <4 x i32> *%a
4645 %cvt = uitofp <4 x i32> %ld to <4 x float>
4646 ret <4 x float> %cvt
4649 define <4 x float> @uitofp_load_4i16_to_4f32(<4 x i16> *%a) {
4650 ; SSE2-LABEL: uitofp_load_4i16_to_4f32:
4652 ; SSE2-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
4653 ; SSE2-NEXT: pxor %xmm1, %xmm1
4654 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4655 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4658 ; SSE41-LABEL: uitofp_load_4i16_to_4f32:
4660 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
4661 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4664 ; AVX-LABEL: uitofp_load_4i16_to_4f32:
4666 ; AVX-NEXT: vpmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
4667 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4669 %ld = load <4 x i16>, <4 x i16> *%a
4670 %cvt = uitofp <4 x i16> %ld to <4 x float>
4671 ret <4 x float> %cvt
4674 define <4 x float> @uitofp_load_4i8_to_4f32(<4 x i8> *%a) {
4675 ; SSE2-LABEL: uitofp_load_4i8_to_4f32:
4677 ; SSE2-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
4678 ; SSE2-NEXT: pxor %xmm1, %xmm1
4679 ; 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]
4680 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
4681 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
4684 ; SSE41-LABEL: uitofp_load_4i8_to_4f32:
4686 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
4687 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
4690 ; AVX-LABEL: uitofp_load_4i8_to_4f32:
4692 ; AVX-NEXT: vpmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
4693 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
4695 %ld = load <4 x i8>, <4 x i8> *%a
4696 %cvt = uitofp <4 x i8> %ld to <4 x float>
4697 ret <4 x float> %cvt
4700 define <8 x float> @uitofp_load_8i64_to_8f32(<8 x i64> *%a) {
4701 ; SSE2-LABEL: uitofp_load_8i64_to_8f32:
4703 ; SSE2-NEXT: movdqa 16(%rdi), %xmm0
4704 ; SSE2-NEXT: movq %xmm0, %rax
4705 ; SSE2-NEXT: testq %rax, %rax
4706 ; SSE2-NEXT: js .LBB87_1
4707 ; SSE2-NEXT: # %bb.2:
4708 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4709 ; SSE2-NEXT: jmp .LBB87_3
4710 ; SSE2-NEXT: .LBB87_1:
4711 ; SSE2-NEXT: movq %rax, %rcx
4712 ; SSE2-NEXT: shrq %rcx
4713 ; SSE2-NEXT: andl $1, %eax
4714 ; SSE2-NEXT: orq %rcx, %rax
4715 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4716 ; SSE2-NEXT: addss %xmm2, %xmm2
4717 ; SSE2-NEXT: .LBB87_3:
4718 ; SSE2-NEXT: movdqa (%rdi), %xmm3
4719 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,2,3]
4720 ; SSE2-NEXT: movq %xmm0, %rax
4721 ; SSE2-NEXT: testq %rax, %rax
4722 ; SSE2-NEXT: js .LBB87_4
4723 ; SSE2-NEXT: # %bb.5:
4724 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4725 ; SSE2-NEXT: jmp .LBB87_6
4726 ; SSE2-NEXT: .LBB87_4:
4727 ; SSE2-NEXT: movq %rax, %rcx
4728 ; SSE2-NEXT: shrq %rcx
4729 ; SSE2-NEXT: andl $1, %eax
4730 ; SSE2-NEXT: orq %rcx, %rax
4731 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4732 ; SSE2-NEXT: addss %xmm1, %xmm1
4733 ; SSE2-NEXT: .LBB87_6:
4734 ; SSE2-NEXT: movq %xmm3, %rax
4735 ; SSE2-NEXT: testq %rax, %rax
4736 ; SSE2-NEXT: js .LBB87_7
4737 ; SSE2-NEXT: # %bb.8:
4738 ; SSE2-NEXT: xorps %xmm0, %xmm0
4739 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4740 ; SSE2-NEXT: jmp .LBB87_9
4741 ; SSE2-NEXT: .LBB87_7:
4742 ; SSE2-NEXT: movq %rax, %rcx
4743 ; SSE2-NEXT: shrq %rcx
4744 ; SSE2-NEXT: andl $1, %eax
4745 ; SSE2-NEXT: orq %rcx, %rax
4746 ; SSE2-NEXT: xorps %xmm0, %xmm0
4747 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
4748 ; SSE2-NEXT: addss %xmm0, %xmm0
4749 ; SSE2-NEXT: .LBB87_9:
4750 ; SSE2-NEXT: movdqa 48(%rdi), %xmm6
4751 ; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[2,3,2,3]
4752 ; SSE2-NEXT: movq %xmm3, %rax
4753 ; SSE2-NEXT: testq %rax, %rax
4754 ; SSE2-NEXT: js .LBB87_10
4755 ; SSE2-NEXT: # %bb.11:
4756 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4757 ; SSE2-NEXT: jmp .LBB87_12
4758 ; SSE2-NEXT: .LBB87_10:
4759 ; SSE2-NEXT: movq %rax, %rcx
4760 ; SSE2-NEXT: shrq %rcx
4761 ; SSE2-NEXT: andl $1, %eax
4762 ; SSE2-NEXT: orq %rcx, %rax
4763 ; SSE2-NEXT: cvtsi2ss %rax, %xmm4
4764 ; SSE2-NEXT: addss %xmm4, %xmm4
4765 ; SSE2-NEXT: .LBB87_12:
4766 ; SSE2-NEXT: movq %xmm6, %rax
4767 ; SSE2-NEXT: testq %rax, %rax
4768 ; SSE2-NEXT: js .LBB87_13
4769 ; SSE2-NEXT: # %bb.14:
4770 ; SSE2-NEXT: xorps %xmm3, %xmm3
4771 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4772 ; SSE2-NEXT: jmp .LBB87_15
4773 ; SSE2-NEXT: .LBB87_13:
4774 ; SSE2-NEXT: movq %rax, %rcx
4775 ; SSE2-NEXT: shrq %rcx
4776 ; SSE2-NEXT: andl $1, %eax
4777 ; SSE2-NEXT: orq %rcx, %rax
4778 ; SSE2-NEXT: xorps %xmm3, %xmm3
4779 ; SSE2-NEXT: cvtsi2ss %rax, %xmm3
4780 ; SSE2-NEXT: addss %xmm3, %xmm3
4781 ; SSE2-NEXT: .LBB87_15:
4782 ; SSE2-NEXT: movdqa 32(%rdi), %xmm5
4783 ; SSE2-NEXT: pshufd {{.*#+}} xmm6 = xmm6[2,3,2,3]
4784 ; SSE2-NEXT: movq %xmm6, %rax
4785 ; SSE2-NEXT: testq %rax, %rax
4786 ; SSE2-NEXT: js .LBB87_16
4787 ; SSE2-NEXT: # %bb.17:
4788 ; SSE2-NEXT: xorps %xmm6, %xmm6
4789 ; SSE2-NEXT: cvtsi2ss %rax, %xmm6
4790 ; SSE2-NEXT: jmp .LBB87_18
4791 ; SSE2-NEXT: .LBB87_16:
4792 ; SSE2-NEXT: movq %rax, %rcx
4793 ; SSE2-NEXT: shrq %rcx
4794 ; SSE2-NEXT: andl $1, %eax
4795 ; SSE2-NEXT: orq %rcx, %rax
4796 ; SSE2-NEXT: xorps %xmm6, %xmm6
4797 ; SSE2-NEXT: cvtsi2ss %rax, %xmm6
4798 ; SSE2-NEXT: addss %xmm6, %xmm6
4799 ; SSE2-NEXT: .LBB87_18:
4800 ; SSE2-NEXT: unpcklps {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
4801 ; SSE2-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
4802 ; SSE2-NEXT: movq %xmm5, %rax
4803 ; SSE2-NEXT: testq %rax, %rax
4804 ; SSE2-NEXT: js .LBB87_19
4805 ; SSE2-NEXT: # %bb.20:
4806 ; SSE2-NEXT: xorps %xmm1, %xmm1
4807 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4808 ; SSE2-NEXT: jmp .LBB87_21
4809 ; SSE2-NEXT: .LBB87_19:
4810 ; SSE2-NEXT: movq %rax, %rcx
4811 ; SSE2-NEXT: shrq %rcx
4812 ; SSE2-NEXT: andl $1, %eax
4813 ; SSE2-NEXT: orq %rcx, %rax
4814 ; SSE2-NEXT: xorps %xmm1, %xmm1
4815 ; SSE2-NEXT: cvtsi2ss %rax, %xmm1
4816 ; SSE2-NEXT: addss %xmm1, %xmm1
4817 ; SSE2-NEXT: .LBB87_21:
4818 ; SSE2-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm2[0]
4819 ; SSE2-NEXT: unpcklps {{.*#+}} xmm3 = xmm3[0],xmm6[0],xmm3[1],xmm6[1]
4820 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm5[2,3,2,3]
4821 ; SSE2-NEXT: movq %xmm2, %rax
4822 ; SSE2-NEXT: testq %rax, %rax
4823 ; SSE2-NEXT: js .LBB87_22
4824 ; SSE2-NEXT: # %bb.23:
4825 ; SSE2-NEXT: xorps %xmm2, %xmm2
4826 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4827 ; SSE2-NEXT: jmp .LBB87_24
4828 ; SSE2-NEXT: .LBB87_22:
4829 ; SSE2-NEXT: movq %rax, %rcx
4830 ; SSE2-NEXT: shrq %rcx
4831 ; SSE2-NEXT: andl $1, %eax
4832 ; SSE2-NEXT: orq %rcx, %rax
4833 ; SSE2-NEXT: xorps %xmm2, %xmm2
4834 ; SSE2-NEXT: cvtsi2ss %rax, %xmm2
4835 ; SSE2-NEXT: addss %xmm2, %xmm2
4836 ; SSE2-NEXT: .LBB87_24:
4837 ; SSE2-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
4838 ; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0],xmm3[0]
4841 ; SSE41-LABEL: uitofp_load_8i64_to_8f32:
4843 ; SSE41-NEXT: movdqa (%rdi), %xmm4
4844 ; SSE41-NEXT: movdqa 16(%rdi), %xmm5
4845 ; SSE41-NEXT: movdqa 32(%rdi), %xmm6
4846 ; SSE41-NEXT: movdqa 48(%rdi), %xmm2
4847 ; SSE41-NEXT: movdqa {{.*#+}} xmm7 = [1,1]
4848 ; SSE41-NEXT: movdqa %xmm4, %xmm0
4849 ; SSE41-NEXT: pand %xmm7, %xmm0
4850 ; SSE41-NEXT: movdqa %xmm4, %xmm1
4851 ; SSE41-NEXT: psrlq $1, %xmm1
4852 ; SSE41-NEXT: por %xmm0, %xmm1
4853 ; SSE41-NEXT: movdqa %xmm4, %xmm3
4854 ; SSE41-NEXT: movdqa %xmm4, %xmm0
4855 ; SSE41-NEXT: blendvpd %xmm0, %xmm1, %xmm3
4856 ; SSE41-NEXT: pextrq $1, %xmm3, %rax
4857 ; SSE41-NEXT: xorps %xmm0, %xmm0
4858 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4859 ; SSE41-NEXT: movq %xmm3, %rax
4860 ; SSE41-NEXT: xorps %xmm3, %xmm3
4861 ; SSE41-NEXT: cvtsi2ss %rax, %xmm3
4862 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[2,3]
4863 ; SSE41-NEXT: movdqa %xmm5, %xmm0
4864 ; SSE41-NEXT: pand %xmm7, %xmm0
4865 ; SSE41-NEXT: movdqa %xmm5, %xmm1
4866 ; SSE41-NEXT: psrlq $1, %xmm1
4867 ; SSE41-NEXT: por %xmm0, %xmm1
4868 ; SSE41-NEXT: shufps {{.*#+}} xmm4 = xmm4[1,3],xmm5[1,3]
4869 ; SSE41-NEXT: movaps %xmm5, %xmm0
4870 ; SSE41-NEXT: blendvpd %xmm0, %xmm1, %xmm5
4871 ; SSE41-NEXT: movq %xmm5, %rax
4872 ; SSE41-NEXT: xorps %xmm0, %xmm0
4873 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4874 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0,1],xmm0[0],xmm3[3]
4875 ; SSE41-NEXT: pextrq $1, %xmm5, %rax
4876 ; SSE41-NEXT: xorps %xmm0, %xmm0
4877 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4878 ; SSE41-NEXT: insertps {{.*#+}} xmm3 = xmm3[0,1,2],xmm0[0]
4879 ; SSE41-NEXT: movaps %xmm3, %xmm1
4880 ; SSE41-NEXT: addps %xmm3, %xmm1
4881 ; SSE41-NEXT: movaps %xmm4, %xmm0
4882 ; SSE41-NEXT: blendvps %xmm0, %xmm1, %xmm3
4883 ; SSE41-NEXT: movdqa %xmm6, %xmm0
4884 ; SSE41-NEXT: pand %xmm7, %xmm0
4885 ; SSE41-NEXT: movdqa %xmm6, %xmm1
4886 ; SSE41-NEXT: psrlq $1, %xmm1
4887 ; SSE41-NEXT: por %xmm0, %xmm1
4888 ; SSE41-NEXT: movdqa %xmm6, %xmm4
4889 ; SSE41-NEXT: movdqa %xmm6, %xmm0
4890 ; SSE41-NEXT: blendvpd %xmm0, %xmm1, %xmm4
4891 ; SSE41-NEXT: pextrq $1, %xmm4, %rax
4892 ; SSE41-NEXT: xorps %xmm0, %xmm0
4893 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4894 ; SSE41-NEXT: movq %xmm4, %rax
4895 ; SSE41-NEXT: xorps %xmm1, %xmm1
4896 ; SSE41-NEXT: cvtsi2ss %rax, %xmm1
4897 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[2,3]
4898 ; SSE41-NEXT: pand %xmm2, %xmm7
4899 ; SSE41-NEXT: movdqa %xmm2, %xmm4
4900 ; SSE41-NEXT: psrlq $1, %xmm4
4901 ; SSE41-NEXT: por %xmm7, %xmm4
4902 ; SSE41-NEXT: shufps {{.*#+}} xmm6 = xmm6[1,3],xmm2[1,3]
4903 ; SSE41-NEXT: movaps %xmm2, %xmm0
4904 ; SSE41-NEXT: blendvpd %xmm0, %xmm4, %xmm2
4905 ; SSE41-NEXT: movq %xmm2, %rax
4906 ; SSE41-NEXT: xorps %xmm0, %xmm0
4907 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4908 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1],xmm0[0],xmm1[3]
4909 ; SSE41-NEXT: pextrq $1, %xmm2, %rax
4910 ; SSE41-NEXT: xorps %xmm0, %xmm0
4911 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
4912 ; SSE41-NEXT: insertps {{.*#+}} xmm1 = xmm1[0,1,2],xmm0[0]
4913 ; SSE41-NEXT: movaps %xmm1, %xmm2
4914 ; SSE41-NEXT: addps %xmm1, %xmm2
4915 ; SSE41-NEXT: movaps %xmm6, %xmm0
4916 ; SSE41-NEXT: blendvps %xmm0, %xmm2, %xmm1
4917 ; SSE41-NEXT: movaps %xmm3, %xmm0
4920 ; AVX1-LABEL: uitofp_load_8i64_to_8f32:
4922 ; AVX1-NEXT: vmovapd (%rdi), %ymm2
4923 ; AVX1-NEXT: vmovapd 32(%rdi), %ymm3
4924 ; AVX1-NEXT: vmovapd {{.*#+}} ymm8 = [1,1,1,1]
4925 ; AVX1-NEXT: vandpd %ymm3, %ymm8, %ymm5
4926 ; AVX1-NEXT: vmovdqa (%rdi), %xmm9
4927 ; AVX1-NEXT: vmovdqa 16(%rdi), %xmm1
4928 ; AVX1-NEXT: vmovdqa 32(%rdi), %xmm6
4929 ; AVX1-NEXT: vpsrlq $1, %xmm6, %xmm7
4930 ; AVX1-NEXT: vmovdqa 48(%rdi), %xmm4
4931 ; AVX1-NEXT: vpsrlq $1, %xmm4, %xmm0
4932 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm7, %ymm0
4933 ; AVX1-NEXT: vorpd %ymm5, %ymm0, %ymm0
4934 ; AVX1-NEXT: vblendvpd %ymm3, %ymm0, %ymm3, %ymm0
4935 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
4936 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm3
4937 ; AVX1-NEXT: vmovq %xmm0, %rax
4938 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm5
4939 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm5[0],xmm3[0],xmm5[2,3]
4940 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4941 ; AVX1-NEXT: vmovq %xmm0, %rax
4942 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm5
4943 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm3[0,1],xmm5[0],xmm3[3]
4944 ; AVX1-NEXT: vpextrq $1, %xmm0, %rax
4945 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm0
4946 ; AVX1-NEXT: vinsertps {{.*#+}} xmm0 = xmm3[0,1,2],xmm0[0]
4947 ; AVX1-NEXT: vaddps %xmm0, %xmm0, %xmm3
4948 ; AVX1-NEXT: vpackssdw %xmm4, %xmm6, %xmm4
4949 ; AVX1-NEXT: vblendvps %xmm4, %xmm3, %xmm0, %xmm0
4950 ; AVX1-NEXT: vandpd %ymm2, %ymm8, %ymm3
4951 ; AVX1-NEXT: vpsrlq $1, %xmm9, %xmm4
4952 ; AVX1-NEXT: vpsrlq $1, %xmm1, %xmm5
4953 ; AVX1-NEXT: vinsertf128 $1, %xmm5, %ymm4, %ymm4
4954 ; AVX1-NEXT: vorpd %ymm3, %ymm4, %ymm3
4955 ; AVX1-NEXT: vblendvpd %ymm2, %ymm3, %ymm2, %ymm2
4956 ; AVX1-NEXT: vpextrq $1, %xmm2, %rax
4957 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm3
4958 ; AVX1-NEXT: vmovq %xmm2, %rax
4959 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm4
4960 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm4[0],xmm3[0],xmm4[2,3]
4961 ; AVX1-NEXT: vextractf128 $1, %ymm2, %xmm2
4962 ; AVX1-NEXT: vmovq %xmm2, %rax
4963 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm4
4964 ; AVX1-NEXT: vinsertps {{.*#+}} xmm3 = xmm3[0,1],xmm4[0],xmm3[3]
4965 ; AVX1-NEXT: vpextrq $1, %xmm2, %rax
4966 ; AVX1-NEXT: vcvtsi2ss %rax, %xmm10, %xmm2
4967 ; AVX1-NEXT: vinsertps {{.*#+}} xmm2 = xmm3[0,1,2],xmm2[0]
4968 ; AVX1-NEXT: vaddps %xmm2, %xmm2, %xmm3
4969 ; AVX1-NEXT: vpackssdw %xmm1, %xmm9, %xmm1
4970 ; AVX1-NEXT: vblendvps %xmm1, %xmm3, %xmm2, %xmm1
4971 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4974 ; AVX2-LABEL: uitofp_load_8i64_to_8f32:
4976 ; AVX2-NEXT: vmovaps (%rdi), %ymm0
4977 ; AVX2-NEXT: vmovdqa 32(%rdi), %ymm1
4978 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm2 = [1,1,1,1]
4979 ; AVX2-NEXT: vpand %ymm2, %ymm1, %ymm3
4980 ; AVX2-NEXT: vpsrlq $1, %ymm1, %ymm4
4981 ; AVX2-NEXT: vpor %ymm3, %ymm4, %ymm3
4982 ; AVX2-NEXT: vblendvpd %ymm1, %ymm3, %ymm1, %ymm1
4983 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
4984 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm5, %xmm3
4985 ; AVX2-NEXT: vmovq %xmm1, %rax
4986 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4987 ; AVX2-NEXT: vinsertps {{.*#+}} xmm3 = xmm4[0],xmm3[0],xmm4[2,3]
4988 ; AVX2-NEXT: vextracti128 $1, %ymm1, %xmm1
4989 ; AVX2-NEXT: vmovq %xmm1, %rax
4990 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm5, %xmm4
4991 ; AVX2-NEXT: vinsertps {{.*#+}} xmm3 = xmm3[0,1],xmm4[0],xmm3[3]
4992 ; AVX2-NEXT: vpextrq $1, %xmm1, %rax
4993 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm5, %xmm1
4994 ; AVX2-NEXT: vinsertps {{.*#+}} xmm1 = xmm3[0,1,2],xmm1[0]
4995 ; AVX2-NEXT: vaddps %xmm1, %xmm1, %xmm3
4996 ; AVX2-NEXT: vmovdqa (%rdi), %xmm4
4997 ; AVX2-NEXT: vmovdqa 32(%rdi), %xmm5
4998 ; AVX2-NEXT: vpackssdw 48(%rdi), %xmm5, %xmm5
4999 ; AVX2-NEXT: vblendvps %xmm5, %xmm3, %xmm1, %xmm1
5000 ; AVX2-NEXT: vandps %ymm2, %ymm0, %ymm2
5001 ; AVX2-NEXT: vpsrlq $1, %ymm0, %ymm3
5002 ; AVX2-NEXT: vpor %ymm2, %ymm3, %ymm2
5003 ; AVX2-NEXT: vblendvpd %ymm0, %ymm2, %ymm0, %ymm0
5004 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
5005 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm6, %xmm2
5006 ; AVX2-NEXT: vmovq %xmm0, %rax
5007 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm6, %xmm3
5008 ; AVX2-NEXT: vinsertps {{.*#+}} xmm2 = xmm3[0],xmm2[0],xmm3[2,3]
5009 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm0
5010 ; AVX2-NEXT: vmovq %xmm0, %rax
5011 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm6, %xmm3
5012 ; AVX2-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm3[0],xmm2[3]
5013 ; AVX2-NEXT: vpextrq $1, %xmm0, %rax
5014 ; AVX2-NEXT: vcvtsi2ss %rax, %xmm6, %xmm0
5015 ; AVX2-NEXT: vinsertps {{.*#+}} xmm0 = xmm2[0,1,2],xmm0[0]
5016 ; AVX2-NEXT: vaddps %xmm0, %xmm0, %xmm2
5017 ; AVX2-NEXT: vpackssdw 16(%rdi), %xmm4, %xmm3
5018 ; AVX2-NEXT: vblendvps %xmm3, %xmm2, %xmm0, %xmm0
5019 ; AVX2-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
5022 ; AVX512F-LABEL: uitofp_load_8i64_to_8f32:
5024 ; AVX512F-NEXT: vmovaps (%rdi), %xmm0
5025 ; AVX512F-NEXT: vmovdqa 16(%rdi), %xmm1
5026 ; AVX512F-NEXT: vmovdqa 32(%rdi), %xmm2
5027 ; AVX512F-NEXT: vmovdqa 48(%rdi), %xmm3
5028 ; AVX512F-NEXT: vpextrq $1, %xmm2, %rax
5029 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm4, %xmm4
5030 ; AVX512F-NEXT: vmovq %xmm2, %rax
5031 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm2
5032 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
5033 ; AVX512F-NEXT: vmovq %xmm3, %rax
5034 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm4
5035 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
5036 ; AVX512F-NEXT: vpextrq $1, %xmm3, %rax
5037 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5038 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
5039 ; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
5040 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5041 ; AVX512F-NEXT: vmovq %xmm0, %rax
5042 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm0
5043 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
5044 ; AVX512F-NEXT: vmovq %xmm1, %rax
5045 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5046 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
5047 ; AVX512F-NEXT: vpextrq $1, %xmm1, %rax
5048 ; AVX512F-NEXT: vcvtusi2ss %rax, %xmm5, %xmm1
5049 ; AVX512F-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
5050 ; AVX512F-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
5051 ; AVX512F-NEXT: retq
5053 ; AVX512VL-LABEL: uitofp_load_8i64_to_8f32:
5054 ; AVX512VL: # %bb.0:
5055 ; AVX512VL-NEXT: vmovaps (%rdi), %xmm0
5056 ; AVX512VL-NEXT: vmovdqa 16(%rdi), %xmm1
5057 ; AVX512VL-NEXT: vmovdqa 32(%rdi), %xmm2
5058 ; AVX512VL-NEXT: vmovdqa 48(%rdi), %xmm3
5059 ; AVX512VL-NEXT: vpextrq $1, %xmm2, %rax
5060 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm4, %xmm4
5061 ; AVX512VL-NEXT: vmovq %xmm2, %rax
5062 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm2
5063 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0],xmm4[0],xmm2[2,3]
5064 ; AVX512VL-NEXT: vmovq %xmm3, %rax
5065 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm4
5066 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1],xmm4[0],xmm2[3]
5067 ; AVX512VL-NEXT: vpextrq $1, %xmm3, %rax
5068 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5069 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm2 = xmm2[0,1,2],xmm3[0]
5070 ; AVX512VL-NEXT: vpextrq $1, %xmm0, %rax
5071 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5072 ; AVX512VL-NEXT: vmovq %xmm0, %rax
5073 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm0
5074 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[2,3]
5075 ; AVX512VL-NEXT: vmovq %xmm1, %rax
5076 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm3
5077 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm3[0],xmm0[3]
5078 ; AVX512VL-NEXT: vpextrq $1, %xmm1, %rax
5079 ; AVX512VL-NEXT: vcvtusi2ss %rax, %xmm5, %xmm1
5080 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm1[0]
5081 ; AVX512VL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
5082 ; AVX512VL-NEXT: retq
5084 ; AVX512DQ-LABEL: uitofp_load_8i64_to_8f32:
5085 ; AVX512DQ: # %bb.0:
5086 ; AVX512DQ-NEXT: vcvtuqq2ps (%rdi), %ymm0
5087 ; AVX512DQ-NEXT: retq
5089 ; AVX512VLDQ-LABEL: uitofp_load_8i64_to_8f32:
5090 ; AVX512VLDQ: # %bb.0:
5091 ; AVX512VLDQ-NEXT: vcvtuqq2ps (%rdi), %ymm0
5092 ; AVX512VLDQ-NEXT: retq
5093 %ld = load <8 x i64>, <8 x i64> *%a
5094 %cvt = uitofp <8 x i64> %ld to <8 x float>
5095 ret <8 x float> %cvt
5098 define <8 x float> @uitofp_load_8i32_to_8f32(<8 x i32> *%a) {
5099 ; SSE2-LABEL: uitofp_load_8i32_to_8f32:
5101 ; SSE2-NEXT: movdqa (%rdi), %xmm0
5102 ; SSE2-NEXT: movdqa 16(%rdi), %xmm1
5103 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [65535,65535,65535,65535]
5104 ; SSE2-NEXT: movdqa %xmm0, %xmm3
5105 ; SSE2-NEXT: pand %xmm2, %xmm3
5106 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [1258291200,1258291200,1258291200,1258291200]
5107 ; SSE2-NEXT: por %xmm4, %xmm3
5108 ; SSE2-NEXT: psrld $16, %xmm0
5109 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [1392508928,1392508928,1392508928,1392508928]
5110 ; SSE2-NEXT: por %xmm5, %xmm0
5111 ; SSE2-NEXT: movaps {{.*#+}} xmm6 = [5.49764202E+11,5.49764202E+11,5.49764202E+11,5.49764202E+11]
5112 ; SSE2-NEXT: subps %xmm6, %xmm0
5113 ; SSE2-NEXT: addps %xmm3, %xmm0
5114 ; SSE2-NEXT: pand %xmm1, %xmm2
5115 ; SSE2-NEXT: por %xmm4, %xmm2
5116 ; SSE2-NEXT: psrld $16, %xmm1
5117 ; SSE2-NEXT: por %xmm5, %xmm1
5118 ; SSE2-NEXT: subps %xmm6, %xmm1
5119 ; SSE2-NEXT: addps %xmm2, %xmm1
5122 ; SSE41-LABEL: uitofp_load_8i32_to_8f32:
5124 ; SSE41-NEXT: movdqa (%rdi), %xmm0
5125 ; SSE41-NEXT: movdqa 16(%rdi), %xmm1
5126 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [1258291200,1258291200,1258291200,1258291200]
5127 ; SSE41-NEXT: movdqa %xmm0, %xmm3
5128 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0],xmm2[1],xmm3[2],xmm2[3],xmm3[4],xmm2[5],xmm3[6],xmm2[7]
5129 ; SSE41-NEXT: psrld $16, %xmm0
5130 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [1392508928,1392508928,1392508928,1392508928]
5131 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm4[1],xmm0[2],xmm4[3],xmm0[4],xmm4[5],xmm0[6],xmm4[7]
5132 ; SSE41-NEXT: movaps {{.*#+}} xmm5 = [5.49764202E+11,5.49764202E+11,5.49764202E+11,5.49764202E+11]
5133 ; SSE41-NEXT: subps %xmm5, %xmm0
5134 ; SSE41-NEXT: addps %xmm3, %xmm0
5135 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3],xmm1[4],xmm2[5],xmm1[6],xmm2[7]
5136 ; SSE41-NEXT: psrld $16, %xmm1
5137 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0],xmm4[1],xmm1[2],xmm4[3],xmm1[4],xmm4[5],xmm1[6],xmm4[7]
5138 ; SSE41-NEXT: subps %xmm5, %xmm1
5139 ; SSE41-NEXT: addps %xmm2, %xmm1
5142 ; AVX1-LABEL: uitofp_load_8i32_to_8f32:
5144 ; AVX1-NEXT: vmovaps (%rdi), %ymm0
5145 ; AVX1-NEXT: vmovdqa (%rdi), %xmm1
5146 ; AVX1-NEXT: vmovdqa 16(%rdi), %xmm2
5147 ; AVX1-NEXT: vpsrld $16, %xmm1, %xmm1
5148 ; AVX1-NEXT: vpsrld $16, %xmm2, %xmm2
5149 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm1, %ymm1
5150 ; AVX1-NEXT: vcvtdq2ps %ymm1, %ymm1
5151 ; AVX1-NEXT: vmulps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm1, %ymm1
5152 ; AVX1-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
5153 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5154 ; AVX1-NEXT: vaddps %ymm0, %ymm1, %ymm0
5157 ; AVX2-LABEL: uitofp_load_8i32_to_8f32:
5159 ; AVX2-NEXT: vmovdqa (%rdi), %ymm0
5160 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200,1258291200]
5161 ; 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]
5162 ; AVX2-NEXT: vpsrld $16, %ymm0, %ymm0
5163 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm2 = [1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928,1392508928]
5164 ; 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]
5165 ; 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]
5166 ; AVX2-NEXT: vsubps %ymm2, %ymm0, %ymm0
5167 ; AVX2-NEXT: vaddps %ymm0, %ymm1, %ymm0
5170 ; AVX512F-LABEL: uitofp_load_8i32_to_8f32:
5172 ; AVX512F-NEXT: vmovaps (%rdi), %ymm0
5173 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
5174 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
5175 ; AVX512F-NEXT: retq
5177 ; AVX512VL-LABEL: uitofp_load_8i32_to_8f32:
5178 ; AVX512VL: # %bb.0:
5179 ; AVX512VL-NEXT: vcvtudq2ps (%rdi), %ymm0
5180 ; AVX512VL-NEXT: retq
5182 ; AVX512DQ-LABEL: uitofp_load_8i32_to_8f32:
5183 ; AVX512DQ: # %bb.0:
5184 ; AVX512DQ-NEXT: vmovaps (%rdi), %ymm0
5185 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
5186 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
5187 ; AVX512DQ-NEXT: retq
5189 ; AVX512VLDQ-LABEL: uitofp_load_8i32_to_8f32:
5190 ; AVX512VLDQ: # %bb.0:
5191 ; AVX512VLDQ-NEXT: vcvtudq2ps (%rdi), %ymm0
5192 ; AVX512VLDQ-NEXT: retq
5193 %ld = load <8 x i32>, <8 x i32> *%a
5194 %cvt = uitofp <8 x i32> %ld to <8 x float>
5195 ret <8 x float> %cvt
5198 define <8 x float> @uitofp_load_8i16_to_8f32(<8 x i16> *%a) {
5199 ; SSE2-LABEL: uitofp_load_8i16_to_8f32:
5201 ; SSE2-NEXT: movdqa (%rdi), %xmm1
5202 ; SSE2-NEXT: pxor %xmm2, %xmm2
5203 ; SSE2-NEXT: movdqa %xmm1, %xmm0
5204 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
5205 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
5206 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
5207 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
5210 ; SSE41-LABEL: uitofp_load_8i16_to_8f32:
5212 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5213 ; SSE41-NEXT: pmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5214 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
5215 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
5218 ; AVX1-LABEL: uitofp_load_8i16_to_8f32:
5220 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5221 ; AVX1-NEXT: vpmovzxwd {{.*#+}} xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero
5222 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5223 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5226 ; AVX2-LABEL: uitofp_load_8i16_to_8f32:
5228 ; 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
5229 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
5232 ; AVX512-LABEL: uitofp_load_8i16_to_8f32:
5234 ; 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
5235 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
5237 %ld = load <8 x i16>, <8 x i16> *%a
5238 %cvt = uitofp <8 x i16> %ld to <8 x float>
5239 ret <8 x float> %cvt
5242 define <8 x float> @uitofp_load_8i8_to_8f32(<8 x i8> *%a) {
5243 ; SSE2-LABEL: uitofp_load_8i8_to_8f32:
5245 ; SSE2-NEXT: movq {{.*#+}} xmm1 = mem[0],zero
5246 ; SSE2-NEXT: pxor %xmm2, %xmm2
5247 ; 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]
5248 ; SSE2-NEXT: movdqa %xmm1, %xmm0
5249 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
5250 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
5251 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm1 = xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
5252 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
5255 ; SSE41-LABEL: uitofp_load_8i8_to_8f32:
5257 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5258 ; SSE41-NEXT: pmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5259 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
5260 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
5263 ; AVX1-LABEL: uitofp_load_8i8_to_8f32:
5265 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5266 ; AVX1-NEXT: vpmovzxbd {{.*#+}} xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
5267 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5268 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5271 ; AVX2-LABEL: uitofp_load_8i8_to_8f32:
5273 ; 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
5274 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
5277 ; AVX512-LABEL: uitofp_load_8i8_to_8f32:
5279 ; 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
5280 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
5282 %ld = load <8 x i8>, <8 x i8> *%a
5283 %cvt = uitofp <8 x i8> %ld to <8 x float>
5284 ret <8 x float> %cvt
5291 %Arguments = type <{ <8 x i8>, <8 x i16>, <8 x float>* }>
5292 define void @aggregate_sitofp_8i16_to_8f32(%Arguments* nocapture readonly %a0) {
5293 ; SSE2-LABEL: aggregate_sitofp_8i16_to_8f32:
5295 ; SSE2-NEXT: movq 24(%rdi), %rax
5296 ; SSE2-NEXT: movdqu 8(%rdi), %xmm0
5297 ; SSE2-NEXT: punpcklwd {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
5298 ; SSE2-NEXT: psrad $16, %xmm1
5299 ; SSE2-NEXT: cvtdq2ps %xmm1, %xmm1
5300 ; SSE2-NEXT: punpckhwd {{.*#+}} xmm0 = xmm0[4,4,5,5,6,6,7,7]
5301 ; SSE2-NEXT: psrad $16, %xmm0
5302 ; SSE2-NEXT: cvtdq2ps %xmm0, %xmm0
5303 ; SSE2-NEXT: movaps %xmm0, 16(%rax)
5304 ; SSE2-NEXT: movaps %xmm1, (%rax)
5307 ; SSE41-LABEL: aggregate_sitofp_8i16_to_8f32:
5309 ; SSE41-NEXT: movq 24(%rdi), %rax
5310 ; SSE41-NEXT: pmovsxwd 16(%rdi), %xmm0
5311 ; SSE41-NEXT: pmovsxwd 8(%rdi), %xmm1
5312 ; SSE41-NEXT: cvtdq2ps %xmm1, %xmm1
5313 ; SSE41-NEXT: cvtdq2ps %xmm0, %xmm0
5314 ; SSE41-NEXT: movaps %xmm0, 16(%rax)
5315 ; SSE41-NEXT: movaps %xmm1, (%rax)
5318 ; AVX1-LABEL: aggregate_sitofp_8i16_to_8f32:
5320 ; AVX1-NEXT: movq 24(%rdi), %rax
5321 ; AVX1-NEXT: vpmovsxwd 16(%rdi), %xmm0
5322 ; AVX1-NEXT: vpmovsxwd 8(%rdi), %xmm1
5323 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5324 ; AVX1-NEXT: vcvtdq2ps %ymm0, %ymm0
5325 ; AVX1-NEXT: vmovaps %ymm0, (%rax)
5326 ; AVX1-NEXT: vzeroupper
5329 ; AVX2-LABEL: aggregate_sitofp_8i16_to_8f32:
5331 ; AVX2-NEXT: movq 24(%rdi), %rax
5332 ; AVX2-NEXT: vpmovsxwd 8(%rdi), %ymm0
5333 ; AVX2-NEXT: vcvtdq2ps %ymm0, %ymm0
5334 ; AVX2-NEXT: vmovaps %ymm0, (%rax)
5335 ; AVX2-NEXT: vzeroupper
5338 ; AVX512-LABEL: aggregate_sitofp_8i16_to_8f32:
5340 ; AVX512-NEXT: movq 24(%rdi), %rax
5341 ; AVX512-NEXT: vpmovsxwd 8(%rdi), %ymm0
5342 ; AVX512-NEXT: vcvtdq2ps %ymm0, %ymm0
5343 ; AVX512-NEXT: vmovaps %ymm0, (%rax)
5344 ; AVX512-NEXT: vzeroupper
5346 %1 = load %Arguments, %Arguments* %a0, align 1
5347 %2 = extractvalue %Arguments %1, 1
5348 %3 = extractvalue %Arguments %1, 2
5349 %4 = sitofp <8 x i16> %2 to <8 x float>
5350 store <8 x float> %4, <8 x float>* %3, align 32
5354 define <2 x double> @sitofp_i32_to_2f64(<2 x double> %a0, i32 %a1) nounwind {
5355 ; SSE-LABEL: sitofp_i32_to_2f64:
5357 ; SSE-NEXT: cvtsi2sd %edi, %xmm0
5360 ; AVX-LABEL: sitofp_i32_to_2f64:
5362 ; AVX-NEXT: vcvtsi2sd %edi, %xmm0, %xmm0
5364 %cvt = sitofp i32 %a1 to double
5365 %res = insertelement <2 x double> %a0, double %cvt, i32 0
5366 ret <2 x double> %res
5369 define <4 x float> @sitofp_i32_to_4f32(<4 x float> %a0, i32 %a1) nounwind {
5370 ; SSE-LABEL: sitofp_i32_to_4f32:
5372 ; SSE-NEXT: cvtsi2ss %edi, %xmm0
5375 ; AVX-LABEL: sitofp_i32_to_4f32:
5377 ; AVX-NEXT: vcvtsi2ss %edi, %xmm0, %xmm0
5379 %cvt = sitofp i32 %a1 to float
5380 %res = insertelement <4 x float> %a0, float %cvt, i32 0
5381 ret <4 x float> %res
5384 define <2 x double> @sitofp_i64_to_2f64(<2 x double> %a0, i64 %a1) nounwind {
5385 ; SSE-LABEL: sitofp_i64_to_2f64:
5387 ; SSE-NEXT: cvtsi2sd %rdi, %xmm0
5390 ; AVX-LABEL: sitofp_i64_to_2f64:
5392 ; AVX-NEXT: vcvtsi2sd %rdi, %xmm0, %xmm0
5394 %cvt = sitofp i64 %a1 to double
5395 %res = insertelement <2 x double> %a0, double %cvt, i32 0
5396 ret <2 x double> %res
5399 define <4 x float> @sitofp_i64_to_4f32(<4 x float> %a0, i64 %a1) nounwind {
5400 ; SSE-LABEL: sitofp_i64_to_4f32:
5402 ; SSE-NEXT: cvtsi2ss %rdi, %xmm0
5405 ; AVX-LABEL: sitofp_i64_to_4f32:
5407 ; AVX-NEXT: vcvtsi2ss %rdi, %xmm0, %xmm0
5409 %cvt = sitofp i64 %a1 to float
5410 %res = insertelement <4 x float> %a0, float %cvt, i32 0
5411 ret <4 x float> %res
5414 ; Extract from int vector and convert to FP.
5416 define float @extract0_sitofp_v4i32_f32(<4 x i32> %x) nounwind {
5417 ; SSE-LABEL: extract0_sitofp_v4i32_f32:
5419 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
5422 ; AVX-LABEL: extract0_sitofp_v4i32_f32:
5424 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
5426 %e = extractelement <4 x i32> %x, i32 0
5427 %r = sitofp i32 %e to float
5431 define float @extract0_sitofp_v4i32_f32i_multiuse1(<4 x i32> %x) nounwind {
5432 ; SSE-LABEL: extract0_sitofp_v4i32_f32i_multiuse1:
5434 ; SSE-NEXT: movd %xmm0, %eax
5435 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
5436 ; SSE-NEXT: incl %eax
5437 ; SSE-NEXT: cvtsi2ss %eax, %xmm1
5438 ; SSE-NEXT: divss %xmm1, %xmm0
5441 ; AVX-LABEL: extract0_sitofp_v4i32_f32i_multiuse1:
5443 ; AVX-NEXT: vmovd %xmm0, %eax
5444 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
5445 ; AVX-NEXT: incl %eax
5446 ; AVX-NEXT: vcvtsi2ss %eax, %xmm1, %xmm1
5447 ; AVX-NEXT: vdivss %xmm1, %xmm0, %xmm0
5449 %e = extractelement <4 x i32> %x, i32 0
5450 %f = sitofp i32 %e to float
5452 %f1 = sitofp i32 %e1 to float
5453 %r = fdiv float %f, %f1
5457 define float @extract0_sitofp_v4i32_f32_multiuse2(<4 x i32> %x, i32* %p) nounwind {
5458 ; SSE-LABEL: extract0_sitofp_v4i32_f32_multiuse2:
5460 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm1
5461 ; SSE-NEXT: movss %xmm0, (%rdi)
5462 ; SSE-NEXT: movaps %xmm1, %xmm0
5465 ; AVX-LABEL: extract0_sitofp_v4i32_f32_multiuse2:
5467 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm1
5468 ; AVX-NEXT: vmovss %xmm0, (%rdi)
5469 ; AVX-NEXT: vmovaps %xmm1, %xmm0
5471 %e = extractelement <4 x i32> %x, i32 0
5472 %r = sitofp i32 %e to float
5473 store i32 %e, i32* %p
5477 define double @extract0_sitofp_v4i32_f64(<4 x i32> %x) nounwind {
5478 ; SSE-LABEL: extract0_sitofp_v4i32_f64:
5480 ; SSE-NEXT: movd %xmm0, %eax
5481 ; SSE-NEXT: xorps %xmm0, %xmm0
5482 ; SSE-NEXT: cvtsi2sd %eax, %xmm0
5485 ; AVX-LABEL: extract0_sitofp_v4i32_f64:
5487 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
5489 %e = extractelement <4 x i32> %x, i32 0
5490 %r = sitofp i32 %e to double
5494 define float @extract0_uitofp_v4i32_f32(<4 x i32> %x) nounwind {
5495 ; SSE-LABEL: extract0_uitofp_v4i32_f32:
5497 ; SSE-NEXT: movd %xmm0, %eax
5498 ; SSE-NEXT: xorps %xmm0, %xmm0
5499 ; SSE-NEXT: cvtsi2ss %rax, %xmm0
5502 ; VEX-LABEL: extract0_uitofp_v4i32_f32:
5504 ; VEX-NEXT: vmovd %xmm0, %eax
5505 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm0
5508 ; AVX512F-LABEL: extract0_uitofp_v4i32_f32:
5510 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
5511 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
5512 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5513 ; AVX512F-NEXT: vzeroupper
5514 ; AVX512F-NEXT: retq
5516 ; AVX512VL-LABEL: extract0_uitofp_v4i32_f32:
5517 ; AVX512VL: # %bb.0:
5518 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
5519 ; AVX512VL-NEXT: retq
5521 ; AVX512DQ-LABEL: extract0_uitofp_v4i32_f32:
5522 ; AVX512DQ: # %bb.0:
5523 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
5524 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
5525 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5526 ; AVX512DQ-NEXT: vzeroupper
5527 ; AVX512DQ-NEXT: retq
5529 ; AVX512VLDQ-LABEL: extract0_uitofp_v4i32_f32:
5530 ; AVX512VLDQ: # %bb.0:
5531 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
5532 ; AVX512VLDQ-NEXT: retq
5533 %e = extractelement <4 x i32> %x, i32 0
5534 %r = uitofp i32 %e to float
5538 define double @extract0_uitofp_v4i32_f64(<4 x i32> %x) nounwind {
5539 ; SSE-LABEL: extract0_uitofp_v4i32_f64:
5541 ; SSE-NEXT: movd %xmm0, %eax
5542 ; SSE-NEXT: xorps %xmm0, %xmm0
5543 ; SSE-NEXT: cvtsi2sd %rax, %xmm0
5546 ; VEX-LABEL: extract0_uitofp_v4i32_f64:
5548 ; VEX-NEXT: vmovd %xmm0, %eax
5549 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm0
5552 ; AVX512F-LABEL: extract0_uitofp_v4i32_f64:
5554 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
5555 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
5556 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5557 ; AVX512F-NEXT: vzeroupper
5558 ; AVX512F-NEXT: retq
5560 ; AVX512VL-LABEL: extract0_uitofp_v4i32_f64:
5561 ; AVX512VL: # %bb.0:
5562 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
5563 ; AVX512VL-NEXT: retq
5565 ; AVX512DQ-LABEL: extract0_uitofp_v4i32_f64:
5566 ; AVX512DQ: # %bb.0:
5567 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
5568 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
5569 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5570 ; AVX512DQ-NEXT: vzeroupper
5571 ; AVX512DQ-NEXT: retq
5573 ; AVX512VLDQ-LABEL: extract0_uitofp_v4i32_f64:
5574 ; AVX512VLDQ: # %bb.0:
5575 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
5576 ; AVX512VLDQ-NEXT: retq
5577 %e = extractelement <4 x i32> %x, i32 0
5578 %r = uitofp i32 %e to double
5582 ; Extract non-zero element from int vector and convert to FP.
5584 define float @extract3_sitofp_v4i32_f32(<4 x i32> %x) nounwind {
5585 ; SSE-LABEL: extract3_sitofp_v4i32_f32:
5587 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
5588 ; SSE-NEXT: cvtdq2ps %xmm0, %xmm0
5591 ; AVX-LABEL: extract3_sitofp_v4i32_f32:
5593 ; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5594 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
5596 %e = extractelement <4 x i32> %x, i32 3
5597 %r = sitofp i32 %e to float
5601 define double @extract3_sitofp_v4i32_f64(<4 x i32> %x) nounwind {
5602 ; SSE2-LABEL: extract3_sitofp_v4i32_f64:
5604 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
5605 ; SSE2-NEXT: movd %xmm0, %eax
5606 ; SSE2-NEXT: xorps %xmm0, %xmm0
5607 ; SSE2-NEXT: cvtsi2sd %eax, %xmm0
5610 ; SSE41-LABEL: extract3_sitofp_v4i32_f64:
5612 ; SSE41-NEXT: extractps $3, %xmm0, %eax
5613 ; SSE41-NEXT: xorps %xmm0, %xmm0
5614 ; SSE41-NEXT: cvtsi2sd %eax, %xmm0
5617 ; AVX-LABEL: extract3_sitofp_v4i32_f64:
5619 ; AVX-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5620 ; AVX-NEXT: vcvtdq2pd %xmm0, %xmm0
5622 %e = extractelement <4 x i32> %x, i32 3
5623 %r = sitofp i32 %e to double
5627 define float @extract3_uitofp_v4i32_f32(<4 x i32> %x) nounwind {
5628 ; SSE2-LABEL: extract3_uitofp_v4i32_f32:
5630 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
5631 ; SSE2-NEXT: movd %xmm0, %eax
5632 ; SSE2-NEXT: xorps %xmm0, %xmm0
5633 ; SSE2-NEXT: cvtsi2ss %rax, %xmm0
5636 ; SSE41-LABEL: extract3_uitofp_v4i32_f32:
5638 ; SSE41-NEXT: extractps $3, %xmm0, %eax
5639 ; SSE41-NEXT: xorps %xmm0, %xmm0
5640 ; SSE41-NEXT: cvtsi2ss %rax, %xmm0
5643 ; VEX-LABEL: extract3_uitofp_v4i32_f32:
5645 ; VEX-NEXT: vextractps $3, %xmm0, %eax
5646 ; VEX-NEXT: vcvtsi2ss %rax, %xmm1, %xmm0
5649 ; AVX512F-LABEL: extract3_uitofp_v4i32_f32:
5651 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5652 ; AVX512F-NEXT: vcvtudq2ps %zmm0, %zmm0
5653 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5654 ; AVX512F-NEXT: vzeroupper
5655 ; AVX512F-NEXT: retq
5657 ; AVX512VL-LABEL: extract3_uitofp_v4i32_f32:
5658 ; AVX512VL: # %bb.0:
5659 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5660 ; AVX512VL-NEXT: vcvtudq2ps %xmm0, %xmm0
5661 ; AVX512VL-NEXT: retq
5663 ; AVX512DQ-LABEL: extract3_uitofp_v4i32_f32:
5664 ; AVX512DQ: # %bb.0:
5665 ; AVX512DQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5666 ; AVX512DQ-NEXT: vcvtudq2ps %zmm0, %zmm0
5667 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5668 ; AVX512DQ-NEXT: vzeroupper
5669 ; AVX512DQ-NEXT: retq
5671 ; AVX512VLDQ-LABEL: extract3_uitofp_v4i32_f32:
5672 ; AVX512VLDQ: # %bb.0:
5673 ; AVX512VLDQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5674 ; AVX512VLDQ-NEXT: vcvtudq2ps %xmm0, %xmm0
5675 ; AVX512VLDQ-NEXT: retq
5676 %e = extractelement <4 x i32> %x, i32 3
5677 %r = uitofp i32 %e to float
5681 define double @extract3_uitofp_v4i32_f64(<4 x i32> %x) nounwind {
5682 ; SSE2-LABEL: extract3_uitofp_v4i32_f64:
5684 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[3,3,3,3]
5685 ; SSE2-NEXT: movd %xmm0, %eax
5686 ; SSE2-NEXT: xorps %xmm0, %xmm0
5687 ; SSE2-NEXT: cvtsi2sd %rax, %xmm0
5690 ; SSE41-LABEL: extract3_uitofp_v4i32_f64:
5692 ; SSE41-NEXT: extractps $3, %xmm0, %eax
5693 ; SSE41-NEXT: xorps %xmm0, %xmm0
5694 ; SSE41-NEXT: cvtsi2sd %rax, %xmm0
5697 ; VEX-LABEL: extract3_uitofp_v4i32_f64:
5699 ; VEX-NEXT: vextractps $3, %xmm0, %eax
5700 ; VEX-NEXT: vcvtsi2sd %rax, %xmm1, %xmm0
5703 ; AVX512F-LABEL: extract3_uitofp_v4i32_f64:
5705 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5706 ; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
5707 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5708 ; AVX512F-NEXT: vzeroupper
5709 ; AVX512F-NEXT: retq
5711 ; AVX512VL-LABEL: extract3_uitofp_v4i32_f64:
5712 ; AVX512VL: # %bb.0:
5713 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5714 ; AVX512VL-NEXT: vcvtudq2pd %xmm0, %xmm0
5715 ; AVX512VL-NEXT: retq
5717 ; AVX512DQ-LABEL: extract3_uitofp_v4i32_f64:
5718 ; AVX512DQ: # %bb.0:
5719 ; AVX512DQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5720 ; AVX512DQ-NEXT: vcvtudq2pd %ymm0, %zmm0
5721 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
5722 ; AVX512DQ-NEXT: vzeroupper
5723 ; AVX512DQ-NEXT: retq
5725 ; AVX512VLDQ-LABEL: extract3_uitofp_v4i32_f64:
5726 ; AVX512VLDQ: # %bb.0:
5727 ; AVX512VLDQ-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,3,3,3]
5728 ; AVX512VLDQ-NEXT: vcvtudq2pd %xmm0, %xmm0
5729 ; AVX512VLDQ-NEXT: retq
5730 %e = extractelement <4 x i32> %x, i32 3
5731 %r = uitofp i32 %e to double
5735 define void @PR43609(double* nocapture %x, <2 x i64> %y) #0 {
5736 ; SSE2-LABEL: PR43609:
5738 ; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2,2]
5739 ; SSE2-NEXT: paddq %xmm0, %xmm1
5740 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [4294967295,4294967295]
5741 ; SSE2-NEXT: movdqa %xmm0, %xmm3
5742 ; SSE2-NEXT: pand %xmm2, %xmm3
5743 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
5744 ; SSE2-NEXT: por %xmm4, %xmm3
5745 ; SSE2-NEXT: psrlq $32, %xmm0
5746 ; SSE2-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
5747 ; SSE2-NEXT: por %xmm5, %xmm0
5748 ; SSE2-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
5749 ; SSE2-NEXT: subpd %xmm6, %xmm0
5750 ; SSE2-NEXT: addpd %xmm3, %xmm0
5751 ; SSE2-NEXT: pand %xmm1, %xmm2
5752 ; SSE2-NEXT: por %xmm4, %xmm2
5753 ; SSE2-NEXT: psrlq $32, %xmm1
5754 ; SSE2-NEXT: por %xmm5, %xmm1
5755 ; SSE2-NEXT: subpd %xmm6, %xmm1
5756 ; SSE2-NEXT: addpd %xmm2, %xmm1
5757 ; SSE2-NEXT: movapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5758 ; SSE2-NEXT: addpd %xmm2, %xmm0
5759 ; SSE2-NEXT: addpd %xmm2, %xmm1
5760 ; SSE2-NEXT: movupd %xmm0, (%rdi)
5761 ; SSE2-NEXT: movupd %xmm1, 16(%rdi)
5764 ; SSE41-LABEL: PR43609:
5766 ; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [2,2]
5767 ; SSE41-NEXT: paddq %xmm0, %xmm1
5768 ; SSE41-NEXT: pxor %xmm2, %xmm2
5769 ; SSE41-NEXT: movdqa %xmm0, %xmm3
5770 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0,1],xmm2[2,3],xmm3[4,5],xmm2[6,7]
5771 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
5772 ; SSE41-NEXT: por %xmm4, %xmm3
5773 ; SSE41-NEXT: psrlq $32, %xmm0
5774 ; SSE41-NEXT: movdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
5775 ; SSE41-NEXT: por %xmm5, %xmm0
5776 ; SSE41-NEXT: movapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
5777 ; SSE41-NEXT: subpd %xmm6, %xmm0
5778 ; SSE41-NEXT: addpd %xmm3, %xmm0
5779 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
5780 ; SSE41-NEXT: por %xmm4, %xmm2
5781 ; SSE41-NEXT: psrlq $32, %xmm1
5782 ; SSE41-NEXT: por %xmm5, %xmm1
5783 ; SSE41-NEXT: subpd %xmm6, %xmm1
5784 ; SSE41-NEXT: addpd %xmm2, %xmm1
5785 ; SSE41-NEXT: movapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5786 ; SSE41-NEXT: addpd %xmm2, %xmm0
5787 ; SSE41-NEXT: addpd %xmm2, %xmm1
5788 ; SSE41-NEXT: movupd %xmm0, (%rdi)
5789 ; SSE41-NEXT: movupd %xmm1, 16(%rdi)
5792 ; AVX1-LABEL: PR43609:
5794 ; AVX1-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
5795 ; AVX1-NEXT: vpxor %xmm2, %xmm2, %xmm2
5796 ; AVX1-NEXT: vpblendw {{.*#+}} xmm3 = xmm0[0,1],xmm2[2,3],xmm0[4,5],xmm2[6,7]
5797 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
5798 ; AVX1-NEXT: vpor %xmm4, %xmm3, %xmm3
5799 ; AVX1-NEXT: vpsrlq $32, %xmm0, %xmm0
5800 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
5801 ; AVX1-NEXT: vpor %xmm5, %xmm0, %xmm0
5802 ; AVX1-NEXT: vmovapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
5803 ; AVX1-NEXT: vsubpd %xmm6, %xmm0, %xmm0
5804 ; AVX1-NEXT: vaddpd %xmm0, %xmm3, %xmm0
5805 ; AVX1-NEXT: vpblendw {{.*#+}} xmm2 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
5806 ; AVX1-NEXT: vpor %xmm4, %xmm2, %xmm2
5807 ; AVX1-NEXT: vpsrlq $32, %xmm1, %xmm1
5808 ; AVX1-NEXT: vpor %xmm5, %xmm1, %xmm1
5809 ; AVX1-NEXT: vsubpd %xmm6, %xmm1, %xmm1
5810 ; AVX1-NEXT: vaddpd %xmm1, %xmm2, %xmm1
5811 ; AVX1-NEXT: vmovapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5812 ; AVX1-NEXT: vaddpd %xmm2, %xmm0, %xmm0
5813 ; AVX1-NEXT: vaddpd %xmm2, %xmm1, %xmm1
5814 ; AVX1-NEXT: vmovupd %xmm0, (%rdi)
5815 ; AVX1-NEXT: vmovupd %xmm1, 16(%rdi)
5818 ; AVX2-LABEL: PR43609:
5820 ; AVX2-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
5821 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
5822 ; AVX2-NEXT: vpblendd {{.*#+}} xmm3 = xmm0[0],xmm2[1],xmm0[2],xmm2[3]
5823 ; AVX2-NEXT: vmovdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
5824 ; AVX2-NEXT: vpor %xmm4, %xmm3, %xmm3
5825 ; AVX2-NEXT: vpsrlq $32, %xmm0, %xmm0
5826 ; AVX2-NEXT: vmovdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
5827 ; AVX2-NEXT: vpor %xmm5, %xmm0, %xmm0
5828 ; AVX2-NEXT: vmovapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
5829 ; AVX2-NEXT: vsubpd %xmm6, %xmm0, %xmm0
5830 ; AVX2-NEXT: vaddpd %xmm0, %xmm3, %xmm0
5831 ; AVX2-NEXT: vpblendd {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3]
5832 ; AVX2-NEXT: vpor %xmm4, %xmm2, %xmm2
5833 ; AVX2-NEXT: vpsrlq $32, %xmm1, %xmm1
5834 ; AVX2-NEXT: vpor %xmm5, %xmm1, %xmm1
5835 ; AVX2-NEXT: vsubpd %xmm6, %xmm1, %xmm1
5836 ; AVX2-NEXT: vaddpd %xmm1, %xmm2, %xmm1
5837 ; AVX2-NEXT: vmovapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5838 ; AVX2-NEXT: vaddpd %xmm2, %xmm0, %xmm0
5839 ; AVX2-NEXT: vaddpd %xmm2, %xmm1, %xmm1
5840 ; AVX2-NEXT: vmovupd %xmm0, (%rdi)
5841 ; AVX2-NEXT: vmovupd %xmm1, 16(%rdi)
5844 ; AVX512F-LABEL: PR43609:
5846 ; AVX512F-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
5847 ; AVX512F-NEXT: vpxor %xmm2, %xmm2, %xmm2
5848 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm3 = xmm0[0],xmm2[1],xmm0[2],xmm2[3]
5849 ; AVX512F-NEXT: vmovdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
5850 ; AVX512F-NEXT: vpor %xmm4, %xmm3, %xmm3
5851 ; AVX512F-NEXT: vpsrlq $32, %xmm0, %xmm0
5852 ; AVX512F-NEXT: vmovdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
5853 ; AVX512F-NEXT: vpor %xmm5, %xmm0, %xmm0
5854 ; AVX512F-NEXT: vmovapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
5855 ; AVX512F-NEXT: vsubpd %xmm6, %xmm0, %xmm0
5856 ; AVX512F-NEXT: vaddpd %xmm0, %xmm3, %xmm0
5857 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3]
5858 ; AVX512F-NEXT: vpor %xmm4, %xmm2, %xmm2
5859 ; AVX512F-NEXT: vpsrlq $32, %xmm1, %xmm1
5860 ; AVX512F-NEXT: vpor %xmm5, %xmm1, %xmm1
5861 ; AVX512F-NEXT: vsubpd %xmm6, %xmm1, %xmm1
5862 ; AVX512F-NEXT: vaddpd %xmm1, %xmm2, %xmm1
5863 ; AVX512F-NEXT: vmovapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5864 ; AVX512F-NEXT: vaddpd %xmm2, %xmm0, %xmm0
5865 ; AVX512F-NEXT: vaddpd %xmm2, %xmm1, %xmm1
5866 ; AVX512F-NEXT: vmovupd %xmm0, (%rdi)
5867 ; AVX512F-NEXT: vmovupd %xmm1, 16(%rdi)
5868 ; AVX512F-NEXT: retq
5870 ; AVX512VL-LABEL: PR43609:
5871 ; AVX512VL: # %bb.0:
5872 ; AVX512VL-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
5873 ; AVX512VL-NEXT: vpxor %xmm2, %xmm2, %xmm2
5874 ; AVX512VL-NEXT: vpblendd {{.*#+}} xmm3 = xmm0[0],xmm2[1],xmm0[2],xmm2[3]
5875 ; AVX512VL-NEXT: vmovdqa {{.*#+}} xmm4 = [4841369599423283200,4841369599423283200]
5876 ; AVX512VL-NEXT: vpor %xmm4, %xmm3, %xmm3
5877 ; AVX512VL-NEXT: vpsrlq $32, %xmm0, %xmm0
5878 ; AVX512VL-NEXT: vmovdqa {{.*#+}} xmm5 = [4985484787499139072,4985484787499139072]
5879 ; AVX512VL-NEXT: vpor %xmm5, %xmm0, %xmm0
5880 ; AVX512VL-NEXT: vmovapd {{.*#+}} xmm6 = [1.9342813118337666E+25,1.9342813118337666E+25]
5881 ; AVX512VL-NEXT: vsubpd %xmm6, %xmm0, %xmm0
5882 ; AVX512VL-NEXT: vaddpd %xmm0, %xmm3, %xmm0
5883 ; AVX512VL-NEXT: vpblendd {{.*#+}} xmm2 = xmm1[0],xmm2[1],xmm1[2],xmm2[3]
5884 ; AVX512VL-NEXT: vpor %xmm4, %xmm2, %xmm2
5885 ; AVX512VL-NEXT: vpsrlq $32, %xmm1, %xmm1
5886 ; AVX512VL-NEXT: vpor %xmm5, %xmm1, %xmm1
5887 ; AVX512VL-NEXT: vsubpd %xmm6, %xmm1, %xmm1
5888 ; AVX512VL-NEXT: vaddpd %xmm1, %xmm2, %xmm1
5889 ; AVX512VL-NEXT: vmovapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5890 ; AVX512VL-NEXT: vaddpd %xmm2, %xmm0, %xmm0
5891 ; AVX512VL-NEXT: vaddpd %xmm2, %xmm1, %xmm1
5892 ; AVX512VL-NEXT: vmovupd %xmm0, (%rdi)
5893 ; AVX512VL-NEXT: vmovupd %xmm1, 16(%rdi)
5894 ; AVX512VL-NEXT: retq
5896 ; AVX512DQ-LABEL: PR43609:
5897 ; AVX512DQ: # %bb.0:
5898 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
5899 ; AVX512DQ-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
5900 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm0, %zmm0
5901 ; AVX512DQ-NEXT: vcvtuqq2pd %zmm1, %zmm1
5902 ; AVX512DQ-NEXT: vmovapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5903 ; AVX512DQ-NEXT: vaddpd %xmm2, %xmm0, %xmm0
5904 ; AVX512DQ-NEXT: vaddpd %xmm2, %xmm1, %xmm1
5905 ; AVX512DQ-NEXT: vmovupd %xmm0, (%rdi)
5906 ; AVX512DQ-NEXT: vmovupd %xmm1, 16(%rdi)
5907 ; AVX512DQ-NEXT: vzeroupper
5908 ; AVX512DQ-NEXT: retq
5910 ; AVX512VLDQ-LABEL: PR43609:
5911 ; AVX512VLDQ: # %bb.0:
5912 ; AVX512VLDQ-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0, %xmm1
5913 ; AVX512VLDQ-NEXT: vcvtuqq2pd %xmm0, %xmm0
5914 ; AVX512VLDQ-NEXT: vcvtuqq2pd %xmm1, %xmm1
5915 ; AVX512VLDQ-NEXT: vmovapd {{.*#+}} xmm2 = [5.0E-1,5.0E-1]
5916 ; AVX512VLDQ-NEXT: vaddpd %xmm2, %xmm0, %xmm0
5917 ; AVX512VLDQ-NEXT: vaddpd %xmm2, %xmm1, %xmm1
5918 ; AVX512VLDQ-NEXT: vmovupd %xmm0, (%rdi)
5919 ; AVX512VLDQ-NEXT: vmovupd %xmm1, 16(%rdi)
5920 ; AVX512VLDQ-NEXT: retq
5921 %step.add.epil = add <2 x i64> %y, <i64 2, i64 2>
5922 %t20 = uitofp <2 x i64> %y to <2 x double>
5923 %t21 = uitofp <2 x i64> %step.add.epil to <2 x double>
5924 %t22 = fadd fast <2 x double> %t20, <double 5.0e-01, double 5.0e-01>
5925 %t23 = fadd fast <2 x double> %t21, <double 5.0e-01, double 5.0e-01>
5926 %t24 = getelementptr inbounds double, double* %x, i64 0
5927 %t25 = bitcast double* %t24 to <2 x double>*
5928 store <2 x double> %t22, <2 x double>* %t25, align 8
5929 %t26 = getelementptr inbounds double, double* %t24, i64 2
5930 %t27 = bitcast double* %t26 to <2 x double>*
5931 store <2 x double> %t23, <2 x double>* %t27, align 8
5935 attributes #0 = { "unsafe-fp-math"="true" }