summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitb8bba6f7651da4ee068b33eaa924e55bf5268c11 (patch)
treecbc4013685562752d0fe9125a1908699c885e2bf /llvm/lib
parentaae5959902110f30292ea4bcbf981cf824092cd0 (diff)
downloadbcm5719-llvm-b8bba6f7651da4ee068b33eaa924e55bf5268c11.tar.gz
bcm5719-llvm-b8bba6f7651da4ee068b33eaa924e55bf5268c11.zip
Fix Bug: test/Regression/Transforms/InstCombine/2002-09-08-PointerShiftBug.ll
llvm-svn: 3626
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 785eb709aa4..748969ab3b7 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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()));
}
OpenPOWER on IntegriCloud