simplify some code.

llvm-svn: 44655
This commit is contained in:
Chris Lattner 2007-12-06 06:25:04 +00:00
parent 91251d1337
commit 861df2f4e9

View File

@ -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);