aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx-shuffle.ll
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2011-12-28 08:14:01 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2011-12-28 08:14:01 +0000
commit021c0a2ee7121c4ccd0765699c14f8c9f7f7c596 (patch)
tree08d392eaebed03037c207ad8531c4b1f880df2c3 /test/CodeGen/X86/avx-shuffle.ll
parent8da7ddf2d28d27e8b7fd8b7f159e2d9584bdc819 (diff)
Fixed a bug in LowerVECTOR_SHUFFLE and LowerBUILD_VECTOR.
Matching MOVLP mask for AVX (265-bit vectors) was wrong. The failure was detected by conformance tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-shuffle.ll')
-rw-r--r--test/CodeGen/X86/avx-shuffle.ll16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/CodeGen/X86/avx-shuffle.ll b/test/CodeGen/X86/avx-shuffle.ll
index e9392ae607..8532b40613 100644
--- a/test/CodeGen/X86/avx-shuffle.ll
+++ b/test/CodeGen/X86/avx-shuffle.ll
@@ -13,8 +13,22 @@ define <4 x float> @test1(<4 x float> %a) nounwind {
define <3 x i64> @test2(<2 x i64> %v) nounwind readnone {
; CHECK: test2:
; CHECK: vxorpd
-; CHECK: vmovsd
+; CHECK: vperm2f128
%1 = shufflevector <2 x i64> %v, <2 x i64> %v, <3 x i32> <i32 0, i32 1, i32 undef>
%2 = shufflevector <3 x i64> zeroinitializer, <3 x i64> %1, <3 x i32> <i32 3, i32 4, i32 2>
ret <3 x i64> %2
}
+
+define <4 x i64> @test3(<4 x i64> %a, <4 x i64> %b) nounwind {
+ %c = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> <i32 4, i32 5, i32 2, i32 undef>
+ ret <4 x i64> %c
+; CHECK: test3:
+; CHECK: vperm2f128
+}
+
+define <8 x float> @test4(float %a) nounwind {
+ %b = insertelement <8 x float> zeroinitializer, float %a, i32 0
+ ret <8 x float> %b
+; CHECK: test4:
+; CHECK: vinsertf128
+} \ No newline at end of file