diff options
author | Nate Begeman <natebegeman@mac.com> | 2008-07-29 15:49:41 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2008-07-29 15:49:41 +0000 |
commit | 5bc1ea0736a5785ed596d58beeff2ab23909e33d (patch) | |
tree | 873c527b697e72ea9a3cc6b65f14717777db584a /lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 75cf9cc527c6ef3097dcefab173e93716a5a3e4a (diff) |
Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index da98d0a0fc..c5f4dea0f0 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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)); |