diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-03-25 00:28:58 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-03-25 00:28:58 +0000 |
| commit | c3b2111d975a39d19f0c5d635e2961a4449c5a71 (patch) | |
| tree | 726ceba3a0f1071e13a4d8b6daaaaabfbbbc83d8 /llvm/lib/Transforms | |
| parent | a6e85a19c6eb96ced06abec12fdfc75e4df0fad5 (diff) | |
| download | bcm5719-llvm-c3b2111d975a39d19f0c5d635e2961a4449c5a71.tar.gz bcm5719-llvm-c3b2111d975a39d19f0c5d635e2961a4449c5a71.zip | |
Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be.
llvm-svn: 67662
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index f631d614573..1f80444632d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6582,7 +6582,8 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI, // preferable because it allows the C<<Y expression to be hoisted out // of a loop if Y is invariant and X is not. if (Shift && Shift->hasOneUse() && RHSV == 0 && - ICI.isEquality() && !Shift->isArithmeticShift()) { + ICI.isEquality() && !Shift->isArithmeticShift() && + !isa<Constant>(Shift->getOperand(0))) { // Compute C << Y. Value *NS; if (Shift->getOpcode() == Instruction::LShr) { |

