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 | e8e4921967994726e2e64c9906e23fec52f00cf7 (patch) | |
tree | 55131c127aece37955a17b639adc90b94f72b6f4 /lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 86bda4174a90eff1305e51b0407a47a8dcecbe7b (diff) |
Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67662 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 f631d61457..1f80444632 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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) { |