summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorStuart Hastings <stuart@apple.com>2011-05-17 22:13:31 +0000
committerStuart Hastings <stuart@apple.com>2011-05-17 22:13:31 +0000
commitca1ef485854d668f794bf389154aa371aa2ed535 (patch)
treeac9f34221b8adf81cfcd29f34c91a0e4b0b772a2 /test/CodeGen
parentc81c9709ef219809b0d04c55a80a8d18c7194f6a (diff)
downloadllvm-ca1ef485854d668f794bf389154aa371aa2ed535.tar.gz
llvm-ca1ef485854d668f794bf389154aa371aa2ed535.tar.bz2
llvm-ca1ef485854d668f794bf389154aa371aa2ed535.tar.xz
X86 pmovsx/pmovzx ignore the upper half of their inputs.
rdar://problem/6945110 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/2011-05-17-pmovzxwd.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2011-05-17-pmovzxwd.ll b/test/CodeGen/X86/2011-05-17-pmovzxwd.ll
new file mode 100644
index 0000000000..9ef67fcb4e
--- /dev/null
+++ b/test/CodeGen/X86/2011-05-17-pmovzxwd.ll
@@ -0,0 +1,15 @@
+; RUN: opt -instcombine -S < %s | FileCheck %s
+; <rdar://problem/6945110>
+
+define <4 x i32> @kernel3_vertical(<4 x i16> * %src, <8 x i16> * %foo) nounwind {
+entry:
+ %tmp = load <4 x i16>* %src
+ %tmp1 = load <8 x i16>* %foo
+; CHECK: shufflevector
+ %tmp2 = shufflevector <4 x i16> %tmp, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
+; CHECK-NOT: shufflevector
+ %tmp3 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 4, i32 5, i32 6, i32 7>
+ %0 = call <4 x i32> @llvm.x86.sse41.pmovzxwd(<8 x i16> %tmp3)
+ ret <4 x i32> %0
+}
+declare <4 x i32> @llvm.x86.sse41.pmovzxwd(<8 x i16>) nounwind readnone