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