diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-02-07 06:28:42 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-02-07 06:28:42 +0000 |
commit | dbd98a4b1b4c5311a45d0ade760ec1218924f45d (patch) | |
tree | ba556564aee07710d3de5b679f6f5342514a420b /test/CodeGen/X86/avx-shuffle.ll | |
parent | 858143816d43e58b17bfd11cb1b57afbd7f0f893 (diff) | |
download | llvm-dbd98a4b1b4c5311a45d0ade760ec1218924f45d.tar.gz llvm-dbd98a4b1b4c5311a45d0ade760ec1218924f45d.tar.bz2 llvm-dbd98a4b1b4c5311a45d0ade760ec1218924f45d.tar.xz |
Add instruction selection for 256-bit VPSHUFD and 128-bit VPERMILPS/VPERMILPD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-shuffle.ll')
-rw-r--r-- | test/CodeGen/X86/avx-shuffle.ll | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/test/CodeGen/X86/avx-shuffle.ll b/test/CodeGen/X86/avx-shuffle.ll index 5a5c35333f..947d79f9e4 100644 --- a/test/CodeGen/X86/avx-shuffle.ll +++ b/test/CodeGen/X86/avx-shuffle.ll @@ -6,7 +6,7 @@ define <4 x float> @test1(<4 x float> %a) nounwind { ret <4 x float> %b ; CHECK: test1: ; CHECK: vshufps -; CHECK: vpshufd +; CHECK: vpermilps } ; rdar://10538417 @@ -98,22 +98,40 @@ define i32 @test10(<4 x i32> %a) nounwind { } define <4 x float> @test11(<4 x float> %a) nounwind { -; CHECK: pshufd $27 +; check: test11 +; check: vpermilps $27 %tmp1 = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0> ret <4 x float> %tmp1 } define <4 x float> @test12(<4 x float>* %a) nounwind { -; CHECK: pshufd $27, ( +; CHECK: test12 +; CHECK: vpermilps $27, ( %tmp0 = load <4 x float>* %a %tmp1 = shufflevector <4 x float> %tmp0, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0> ret <4 x float> %tmp1 } -;CHECK: test13 -;CHECK: shufd -;CHECK: ret -define <4 x i32> @test13(<2 x i32>%x) nounwind readnone { +define <4 x i32> @test13(<4 x i32> %a) nounwind { +; check: test13 +; check: vpshufd $27 + %tmp1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0> + ret <4 x i32> %tmp1 +} + +define <4 x i32> @test14(<4 x i32>* %a) nounwind { +; CHECK: test14 +; CHECK: vpshufd $27, ( + %tmp0 = load <4 x i32>* %a + %tmp1 = shufflevector <4 x i32> %tmp0, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0> + ret <4 x i32> %tmp1 +} + +; CHECK: test15 +; CHECK: vpshufd $8 +; CHECK: ret +define <4 x i32> @test15(<2 x i32>%x) nounwind readnone { %x1 = shufflevector <2 x i32> %x, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> ret <4 x i32>%x1 } + |