summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2013-11-26 20:31:31 +0000
committerMichael Liao <michael.liao@intel.com>2013-11-26 20:31:31 +0000
commitd617a3015dbc00da9fbef6914da8f119ad84ef89 (patch)
treeb26ce72906f157cae4697c5e3ae262776f187d67 /llvm/test/CodeGen
parente43611fc45ad0151949aaab96131670f25b3dccb (diff)
downloadbcm5719-llvm-d617a3015dbc00da9fbef6914da8f119ad84ef89.tar.gz
bcm5719-llvm-d617a3015dbc00da9fbef6914da8f119ad84ef89.zip
Fix PR18054
- Fix bug in (vsext (vzext x)) -> (vsext x) in SIGN_EXTEND_IN_REG lowering where we need to check whether x is a vector type (in-reg type) of i8, i16 or i32; otherwise, that optimization is not valid. llvm-svn: 195779
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/pr18054.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr18054.ll b/llvm/test/CodeGen/X86/pr18054.ll
new file mode 100644
index 00000000000..b7af5161804
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr18054.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=penryn | FileCheck %s
+
+define void @foo(<16 x i32>* %p, <16 x i1> %x) {
+ %ret = sext <16 x i1> %x to <16 x i32>
+ store <16 x i32> %ret, <16 x i32>* %p
+ ret void
+; CHECK: foo
+; CHECK-NOT: pmovsxbd
+; CHECK: ret
+}
OpenPOWER on IntegriCloud