aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-08 21:39:07 +0000
committerChris Lattner <sabre@nondot.org>2002-09-08 21:39:07 +0000
commite30e1cf029000f167e1456fbe1ac780599cce703 (patch)
tree45080062a8fcc8e1651db67adfc20d172729ae1c
parent05eb9581b2e327032f3ace036ecc34969f17bd9f (diff)
Fix Bug: test/Regression/Transforms/InstCombine/2002-09-08-PointerShiftBug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3626 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 785eb709aa..748969ab3b 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -492,6 +492,7 @@ Instruction *InstCombiner::visitShiftInst(Instruction &I) {
if (ConstantUInt *CUI = dyn_cast<ConstantUInt>(Op1)) {
unsigned TypeBits = Op0->getType()->getPrimitiveSize()*8;
if (CUI->getValue() >= TypeBits &&
+ TypeBits && // FIXME: Handle pointer operands here. This should go away
!(Op0->getType()->isSigned() && I.getOpcode() == Instruction::Shr))
return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType()));
}