aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-09-19 23:36:50 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-09-19 23:36:50 +0000
commit97136c922ec4b492584cb91c1fc1cdcb40983ecf (patch)
treed62cd3734172a35fe08fa44367dafddb238b18f6 /test
parent9c6712721c114f8e67b9a6b3cb1dd5d18b4cb435 (diff)
downloadexternal_llvm-97136c922ec4b492584cb91c1fc1cdcb40983ecf.zip
external_llvm-97136c922ec4b492584cb91c1fc1cdcb40983ecf.tar.gz
external_llvm-97136c922ec4b492584cb91c1fc1cdcb40983ecf.tar.bz2
Based on the small opt Zvi's patch was trying to achieve, eliminate
128-bit undef subvector insertion into a 256-bit vector git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/avx-vinsertf128.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-vinsertf128.ll b/test/CodeGen/X86/avx-vinsertf128.ll
index a6f2585..8813a7f 100644
--- a/test/CodeGen/X86/avx-vinsertf128.ll
+++ b/test/CodeGen/X86/avx-vinsertf128.ll
@@ -36,3 +36,11 @@ allocas:
store <4 x i32> %blendAsInt.i503, <4 x i32>* undef, align 4
ret void
}
+
+; CHECK: _C
+; CHECK-NOT: vinsertf128 $1
+define <4 x i32> @C(<4 x i32> %v1) nounwind readonly {
+ %1 = shufflevector <4 x i32> %v1, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ %2 = shufflevector <8 x i32> %1, <8 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+ ret <4 x i32> %2
+}