From d2bbbabbfb93ab582477c24fea221862af1588a9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 6 Dec 2007 06:25:04 +0000 Subject: simplify some code. llvm-svn: 44655 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index b1317502836..a868e56ca63 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6082,9 +6082,8 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1, // the constant which would cause it to be modified for this // operation. // - if (isValid && !isLeftShift && I.getOpcode() == Instruction::AShr) { + if (isValid && I.getOpcode() == Instruction::AShr) isValid = Op0C->getValue()[TypeBits-1] == highBitSet; - } if (isValid) { Constant *NewRHS = ConstantExpr::get(I.getOpcode(), Op0C, Op1); -- cgit v1.2.3