summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-06-20 05:39:26 +0000
committerCraig Topper <craig.topper@gmail.com>2012-06-20 05:39:26 +0000
commit703c38bf584b39275ba517982677491607f46d20 (patch)
tree0cc0bda0b2e5930f460d25d3ae3fd76fd4c690ce /test
parent37aa33bc11c01a7142bfa2428a5a4d219b07b6c3 (diff)
downloadllvm-703c38bf584b39275ba517982677491607f46d20.tar.gz
llvm-703c38bf584b39275ba517982677491607f46d20.tar.bz2
llvm-703c38bf584b39275ba517982677491607f46d20.tar.xz
Don't insert 128-bit UNDEF into 256-bit vectors. Just keep the 256-bit vector. Original patch by Elena Demikhovsky. Tweaked by me to allow possibility of covering more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rwxr-xr-xtest/CodeGen/X86/avx-shuffle-x86_32.ll2
-rw-r--r--test/CodeGen/X86/avx-shuffle.ll8
2 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/X86/avx-shuffle-x86_32.ll b/test/CodeGen/X86/avx-shuffle-x86_32.ll
index 5268ec3a56..e203c4ed02 100755
--- a/test/CodeGen/X86/avx-shuffle-x86_32.ll
+++ b/test/CodeGen/X86/avx-shuffle-x86_32.ll
@@ -4,5 +4,5 @@ define <4 x i64> @test1(<4 x i64> %a) nounwind {
%b = shufflevector <4 x i64> %a, <4 x i64> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
ret <4 x i64>%b
; CHECK: test1:
- ; CHECK: vinsertf128
+ ; CHECK-NOT: vinsertf128
}
diff --git a/test/CodeGen/X86/avx-shuffle.ll b/test/CodeGen/X86/avx-shuffle.ll
index f1debffd11..edfe4ab6c7 100644
--- a/test/CodeGen/X86/avx-shuffle.ll
+++ b/test/CodeGen/X86/avx-shuffle.ll
@@ -219,3 +219,11 @@ define <16 x i16> @narrow(<16 x i16> %a) nounwind alwaysinline {
%t = shufflevector <16 x i16> %a, <16 x i16> undef, <16 x i32> <i32 2, i32 3, i32 undef, i32 1, i32 6, i32 7, i32 4, i32 5, i32 10, i32 11, i32 8, i32 undef, i32 14, i32 15, i32 undef, i32 undef>
ret <16 x i16> %t
}
+
+;CHECK: test17
+;CHECK-NOT: vinsertf128
+;CHECK: ret
+define <8 x float> @test17(<4 x float> %y) {
+ %x = shufflevector <4 x float> %y, <4 x float> undef, <8 x i32> <i32 undef, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
+ ret <8 x float> %x
+}