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