llvm.org GIT mirror llvm / 4a05d35
[X86][SSE] Regenerate vector blend commutation tests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258091 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 4 years ago
2 changed file(s) with 48 addition(s) and 46 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llc -O3 -mtriple=x86_64-unknown -mcpu=core-avx2 -mattr=avx2 < %s | FileCheck %s
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
12
23 define <8 x i16> @commute_fold_vpblendw_128(<8 x i16> %a, <8 x i16>* %b) #0 {
4 ; CHECK-LABEL: commute_fold_vpblendw_128:
5 ; CHECK: # BB#0:
6 ; CHECK-NEXT: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1,2,3],xmm0[4],mem[5,6,7]
7 ; CHECK-NEXT: retq
38 %1 = load <8 x i16>, <8 x i16>* %b
49 %2 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %1, <8 x i16> %a, i8 17)
510 ret <8 x i16> %2
6
7 ;LABEL: commute_fold_vpblendw_128
8 ;CHECK: vpblendw {{.*#+}} xmm0 = xmm0[0],mem[1,2,3],xmm0[4],mem[5,6,7]
9 ;CHECK-NEXT: retq
1011 }
1112 declare <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16>, <8 x i16>, i8) nounwind readnone
1213
1314 define <16 x i16> @commute_fold_vpblendw_256(<16 x i16> %a, <16 x i16>* %b) #0 {
15 ; CHECK-LABEL: commute_fold_vpblendw_256:
16 ; CHECK: # BB#0:
17 ; CHECK-NEXT: vpblendw {{.*#+}} ymm0 = ymm0[0],mem[1,2,3],ymm0[4],mem[5,6,7],ymm0[8],mem[9,10,11],ymm0[12],mem[13,14,15]
18 ; CHECK-NEXT: retq
1419 %1 = load <16 x i16>, <16 x i16>* %b
1520 %2 = call <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16> %1, <16 x i16> %a, i8 17)
1621 ret <16 x i16> %2
17
18 ;LABEL: commute_fold_vpblendw_256
19 ;CHECK: vpblendw {{.*#+}} ymm0 = ymm0[0],mem[1,2,3],ymm0[4],mem[5,6,7],ymm0[8],mem[9,10,11],ymm0[12],mem[13,14,15]
20 ;CHECK-NEXT: retq
2122 }
2223 declare <16 x i16> @llvm.x86.avx2.pblendw(<16 x i16>, <16 x i16>, i8) nounwind readnone
2324
2425 define <4 x i32> @commute_fold_vpblendd_128(<4 x i32> %a, <4 x i32>* %b) #0 {
26 ; CHECK-LABEL: commute_fold_vpblendd_128:
27 ; CHECK: # BB#0:
28 ; CHECK-NEXT: vpblendd {{.*#+}} xmm0 = xmm0[0],mem[1,2,3]
29 ; CHECK-NEXT: retq
2530 %1 = load <4 x i32>, <4 x i32>* %b
2631 %2 = call <4 x i32> @llvm.x86.avx2.pblendd.128(<4 x i32> %1, <4 x i32> %a, i8 1)
2732 ret <4 x i32> %2
28
29 ;LABEL: commute_fold_vpblendd_128
30 ;CHECK: vpblendd {{.*#+}} xmm0 = xmm0[0],mem[1,2,3]
31 ;CHECK-NEXT: retq
3233 }
3334 declare <4 x i32> @llvm.x86.avx2.pblendd.128(<4 x i32>, <4 x i32>, i8) nounwind readnone
3435
3536 define <8 x i32> @commute_fold_vpblendd_256(<8 x i32> %a, <8 x i32>* %b) #0 {
37 ; CHECK-LABEL: commute_fold_vpblendd_256:
38 ; CHECK: # BB#0:
39 ; CHECK-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0],mem[1,2,3,4,5,6],ymm0[7]
40 ; CHECK-NEXT: retq
3641 %1 = load <8 x i32>, <8 x i32>* %b
3742 %2 = call <8 x i32> @llvm.x86.avx2.pblendd.256(<8 x i32> %1, <8 x i32> %a, i8 129)
3843 ret <8 x i32> %2
39
40 ;LABEL: commute_fold_vpblendd_256
41 ;CHECK: vpblendd {{.*#+}} ymm0 = ymm0[0],mem[1,2,3,4,5,6],ymm0[7]
42 ;CHECK-NEXT: retq
4344 }
4445 declare <8 x i32> @llvm.x86.avx2.pblendd.256(<8 x i32>, <8 x i32>, i8) nounwind readnone
4546
4647 define <4 x float> @commute_fold_vblendps_128(<4 x float> %a, <4 x float>* %b) #0 {
48 ; CHECK-LABEL: commute_fold_vblendps_128:
49 ; CHECK: # BB#0:
50 ; CHECK-NEXT: vblendps {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3]
51 ; CHECK-NEXT: retq
4752 %1 = load <4 x float>, <4 x float>* %b
4853 %2 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %1, <4 x float> %a, i8 5)
4954 ret <4 x float> %2
50
51 ;LABEL: commute_fold_vblendps_128
52 ;CHECK: vblendps {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3]
53 ;CHECK-NEXT: retq
5455 }
5556 declare <4 x float> @llvm.x86.sse41.blendps(<4 x float>, <4 x float>, i8) nounwind readnone
5657
5758 define <8 x float> @commute_fold_vblendps_256(<8 x float> %a, <8 x float>* %b) #0 {
59 ; CHECK-LABEL: commute_fold_vblendps_256:
60 ; CHECK: # BB#0:
61 ; CHECK-NEXT: vblendps {{.*#+}} ymm0 = ymm0[0,1,2],mem[3,4,5,6,7]
62 ; CHECK-NEXT: retq
5863 %1 = load <8 x float>, <8 x float>* %b
5964 %2 = call <8 x float> @llvm.x86.avx.blend.ps.256(<8 x float> %1, <8 x float> %a, i8 7)
6065 ret <8 x float> %2
61
62 ;LABEL: commute_fold_vblendps_256
63 ;CHECK: vblendps {{.*#+}} ymm0 = ymm0[0,1,2],mem[3,4,5,6,7]
64 ;CHECK-NEXT: retq
6566 }
6667 declare <8 x float> @llvm.x86.avx.blend.ps.256(<8 x float>, <8 x float>, i8) nounwind readnone
6768
6869 define <2 x double> @commute_fold_vblendpd_128(<2 x double> %a, <2 x double>* %b) #0 {
70 ; CHECK-LABEL: commute_fold_vblendpd_128:
71 ; CHECK: # BB#0:
72 ; CHECK-NEXT: vblendpd {{.*#+}} xmm0 = xmm0[0],mem[1]
73 ; CHECK-NEXT: retq
6974 %1 = load <2 x double>, <2 x double>* %b
7075 %2 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %1, <2 x double> %a, i8 1)
7176 ret <2 x double> %2
72
73 ;LABEL: commute_fold_vblendpd_128
74 ;CHECK: vblendpd {{.*#+}} xmm0 = xmm0[0],mem[1]
75 ;CHECK-NEXT: retq
7677 }
7778 declare <2 x double> @llvm.x86.sse41.blendpd(<2 x double>, <2 x double>, i8) nounwind readnone
7879
7980 define <4 x double> @commute_fold_vblendpd_256(<4 x double> %a, <4 x double>* %b) #0 {
81 ; CHECK-LABEL: commute_fold_vblendpd_256:
82 ; CHECK: # BB#0:
83 ; CHECK-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0,1,2],mem[3]
84 ; CHECK-NEXT: retq
8085 %1 = load <4 x double>, <4 x double>* %b
8186 %2 = call <4 x double> @llvm.x86.avx.blend.pd.256(<4 x double> %1, <4 x double> %a, i8 7)
8287 ret <4 x double> %2
83
84 ;LABEL: commute_fold_vblendpd_256
85 ;CHECK: vblendpd {{.*#+}} ymm0 = ymm0[0,1,2],mem[3]
86 ;CHECK-NEXT: retq
8788 }
8889 declare <4 x double> @llvm.x86.avx.blend.pd.256(<4 x double>, <4 x double>, i8) nounwind readnone
None ; RUN: llc -O3 -mtriple=x86_64-unknown -mcpu=corei7 < %s | FileCheck %s
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse4.1 | FileCheck %s
12
23 define <8 x i16> @commute_fold_pblendw(<8 x i16> %a, <8 x i16>* %b) #0 {
4 ; CHECK-LABEL: commute_fold_pblendw:
5 ; CHECK: # BB#0:
6 ; CHECK-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],mem[1,2,3],xmm0[4],mem[5,6,7]
7 ; CHECK-NEXT: retq
38 %1 = load <8 x i16>, <8 x i16>* %b
49 %2 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %1, <8 x i16> %a, i8 17)
510 ret <8 x i16> %2
6
7 ;LABEL: commute_fold_pblendw
8 ;CHECK: pblendw {{.*#+}} xmm0 = xmm0[0],mem[1,2,3],xmm0[4],mem[5,6,7]
9 ;CHECK-NEXT: retq
1011 }
1112 declare <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16>, <8 x i16>, i8) nounwind readnone
1213
1314 define <4 x float> @commute_fold_blendps(<4 x float> %a, <4 x float>* %b) #0 {
15 ; CHECK-LABEL: commute_fold_blendps:
16 ; CHECK: # BB#0:
17 ; CHECK-NEXT: blendps {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3]
18 ; CHECK-NEXT: retq
1419 %1 = load <4 x float>, <4 x float>* %b
1520 %2 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %1, <4 x float> %a, i8 5)
1621 ret <4 x float> %2
17
18 ;LABEL: commute_fold_blendps
19 ;CHECK: blendps {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3]
20 ;CHECK-NEXT: retq
2122 }
2223 declare <4 x float> @llvm.x86.sse41.blendps(<4 x float>, <4 x float>, i8) nounwind readnone
2324
2425 define <2 x double> @commute_fold_blendpd(<2 x double> %a, <2 x double>* %b) #0 {
26 ; CHECK-LABEL: commute_fold_blendpd:
27 ; CHECK: # BB#0:
28 ; CHECK-NEXT: blendpd {{.*#+}} xmm0 = xmm0[0],mem[1]
29 ; CHECK-NEXT: retq
2530 %1 = load <2 x double>, <2 x double>* %b
2631 %2 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %1, <2 x double> %a, i8 1)
2732 ret <2 x double> %2
28
29 ;LABEL: commute_fold_vblendpd
30 ;CHECK: blendpd {{.*#+}} xmm0 = xmm0[0],mem[1]
31 ;CHECK-NEXT: retq
3233 }
3334 declare <2 x double> @llvm.x86.sse41.blendpd(<2 x double>, <2 x double>, i8) nounwind readnone