summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-07-29 15:49:41 +0000
committerNate Begeman <natebegeman@mac.com>2008-07-29 15:49:41 +0000
commitfecbc8cff16c31f7481220672657eb2f67e81521 (patch)
tree736ff40892fb60546592d0f7e38bcea88657f2db /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parent98b5c16e3bf2f26264925e74f89b8a1d77ea2a1a (diff)
downloadbcm5719-llvm-fecbc8cff16c31f7481220672657eb2f67e81521.tar.gz
bcm5719-llvm-fecbc8cff16c31f7481220672657eb2f67e81521.zip
Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next. llvm-svn: 54161
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index da98d0a0fcb..c5f4dea0f0f 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -6368,7 +6368,8 @@ Instruction *InstCombiner::visitAShr(BinaryOperator &I) {
return ReplaceInstUsesWith(I, CSI);
// See if we can turn a signed shr into an unsigned shr.
- if (MaskedValueIsZero(Op0,
+ if (!isa<VectorType>(I.getType()) &&
+ MaskedValueIsZero(Op0,
APInt::getSignBit(I.getType()->getPrimitiveSizeInBits())))
return BinaryOperator::CreateLShr(Op0, I.getOperand(1));
OpenPOWER on IntegriCloud