1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32-SSE
3 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+avx | FileCheck %s --check-prefix=X32-AVX
4 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64-SSE
5 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx | FileCheck %s --check-prefix=X64-AVX
9 define <4 x float> @mask_ucvt_4i32_4f32(<4 x i32> %a) {
10 ; X32-SSE-LABEL: mask_ucvt_4i32_4f32:
12 ; X32-SSE-NEXT: andps {{\.LCPI.*}}, %xmm0
13 ; X32-SSE-NEXT: cvtdq2ps %xmm0, %xmm0
16 ; X32-AVX-LABEL: mask_ucvt_4i32_4f32:
18 ; X32-AVX-NEXT: vandps {{\.LCPI.*}}, %xmm0, %xmm0
19 ; X32-AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
22 ; X64-SSE-LABEL: mask_ucvt_4i32_4f32:
24 ; X64-SSE-NEXT: andps {{.*}}(%rip), %xmm0
25 ; X64-SSE-NEXT: cvtdq2ps %xmm0, %xmm0
28 ; X64-AVX-LABEL: mask_ucvt_4i32_4f32:
30 ; X64-AVX-NEXT: vandps {{.*}}(%rip), %xmm0, %xmm0
31 ; X64-AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
33 %and = and <4 x i32> %a, <i32 127, i32 255, i32 4095, i32 65595>
34 %cvt = uitofp <4 x i32> %and to <4 x float>
38 define <4 x double> @mask_ucvt_4i32_4f64(<4 x i32> %a) {
39 ; X32-SSE-LABEL: mask_ucvt_4i32_4f64:
41 ; X32-SSE-NEXT: pand {{\.LCPI.*}}, %xmm0
42 ; X32-SSE-NEXT: cvtdq2pd %xmm0, %xmm2
43 ; X32-SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
44 ; X32-SSE-NEXT: cvtdq2pd %xmm0, %xmm1
45 ; X32-SSE-NEXT: movaps %xmm2, %xmm0
48 ; X32-AVX-LABEL: mask_ucvt_4i32_4f64:
50 ; X32-AVX-NEXT: vandps {{\.LCPI.*}}, %xmm0, %xmm0
51 ; X32-AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
54 ; X64-SSE-LABEL: mask_ucvt_4i32_4f64:
56 ; X64-SSE-NEXT: pand {{.*}}(%rip), %xmm0
57 ; X64-SSE-NEXT: cvtdq2pd %xmm0, %xmm2
58 ; X64-SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
59 ; X64-SSE-NEXT: cvtdq2pd %xmm0, %xmm1
60 ; X64-SSE-NEXT: movaps %xmm2, %xmm0
63 ; X64-AVX-LABEL: mask_ucvt_4i32_4f64:
65 ; X64-AVX-NEXT: vandps {{.*}}(%rip), %xmm0, %xmm0
66 ; X64-AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
68 %and = and <4 x i32> %a, <i32 127, i32 255, i32 4095, i32 65595>
69 %cvt = uitofp <4 x i32> %and to <4 x double>