From b8bba6f7651da4ee068b33eaa924e55bf5268c11 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 8 Sep 2002 21:39:07 +0000 Subject: Fix Bug: test/Regression/Transforms/InstCombine/2002-09-08-PointerShiftBug.ll llvm-svn: 3626 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Transforms') 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(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())); } -- cgit v1.2.3