llvm.org GIT mirror llvm / 0a6c80a
Add reproducer test for pr32449. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298930 91177308-0d34-0410-b5e6-96231b3b80d8 Zvi Rackover 3 years ago
1 changed file(s) with 44 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx2 | FileCheck %s --check-prefix=AVX2
2 ; PR32449
3
4 define <2 x double> @foo2(<2 x double> %v, <2 x double> *%p) nounwind {
5 ; AVX2-LABEL: foo2:
6 ; AVX2: # BB#0:
7 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,1]
8 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm0 = xmm1[1,0]
9 ; AVX2-NEXT: vmovapd %xmm1, (%rdi)
10 ; AVX2-NEXT: retq
11 %res = shufflevector <2 x double> %v, <2 x double> undef, <2 x i32>
12 %res1 = shufflevector<2 x double> %res, <2 x double> undef, <2 x i32>
13 store <2 x double> %res, <2 x double>* %p
14 ret <2 x double> %res1
15 }
16
17 define <4 x double> @foo4(<4 x double> %v, <4 x double> *%p) nounwind {
18 ; AVX2-LABEL: foo4:
19 ; AVX2: # BB#0:
20 ; AVX2-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[2,2,2,2]
21 ; AVX2-NEXT: vpermpd {{.*#+}} ymm0 = ymm1[2,0,2,3]
22 ; AVX2-NEXT: vmovapd %ymm1, (%rdi)
23 ; AVX2-NEXT: retq
24 %res = shufflevector <4 x double> %v, <4 x double> undef, <4 x i32>
25 %res1 = shufflevector<4 x double> %res, <4 x double> undef, <4 x i32>
26 store <4 x double> %res, <4 x double>* %p
27 ret <4 x double> %res1
28 }
29
30 define <8 x float> @foo8(<8 x float> %v, <8 x float> *%p) nounwind {
31 ; AVX2-LABEL: foo8:
32 ; AVX2: # BB#0:
33 ; AVX2-NEXT: vmovshdup {{.*#+}} ymm0 = ymm0[1,1,3,3,5,5,7,7]
34 ; AVX2-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[2,2,2,2]
35 ; AVX2-NEXT: vmovaps {{.*#+}} ymm0 = <2,0,u,u,5,1,3,7>
36 ; AVX2-NEXT: vpermps %ymm1, %ymm0, %ymm0
37 ; AVX2-NEXT: vmovapd %ymm1, (%rdi)
38 ; AVX2-NEXT: retq
39 %res = shufflevector <8 x float> %v, <8 x float> undef, <8 x i32>
40 %res1 = shufflevector<8 x float> %res, <8 x float> undef, <8 x i32>
41 store <8 x float> %res, <8 x float>* %p
42 ret <8 x float> %res1
43 }