summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx-shuffle.ll
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-10-10 22:28:47 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-10-10 22:28:47 +0000
commitdca62d53b74164364b3eaa58df3a284cf86fa016 (patch)
tree6b538f4b29780d61b7b5d49a2e9e83a5740143d3 /test/CodeGen/X86/avx-shuffle.ll
parente2f2f07be7cf2b55b7e5501291bbcede87e43fd6 (diff)
downloadllvm-dca62d53b74164364b3eaa58df3a284cf86fa016.tar.gz
llvm-dca62d53b74164364b3eaa58df3a284cf86fa016.tar.bz2
llvm-dca62d53b74164364b3eaa58df3a284cf86fa016.tar.xz
Make sure the X86 backend doesn't explode on 128-bit shuffles in AVX mode. Fixes PR11102.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-shuffle.ll')
-rw-r--r--test/CodeGen/X86/avx-shuffle.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-shuffle.ll b/test/CodeGen/X86/avx-shuffle.ll
new file mode 100644
index 0000000000..0db334dd99
--- /dev/null
+++ b/test/CodeGen/X86/avx-shuffle.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
+
+; PR11102
+define <4 x float> @test1(<4 x float> %a) nounwind {
+ %b = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 2, i32 5, i32 undef, i32 undef>
+ ret <4 x float> %b
+; CHECK: test1:
+; CHECK: vshufps
+; CHECK: vpshufd
+}