Fix regression on 400.perlbench last night.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-12-12 18:41:03 +00:00
parent a898ce687a
commit 078b631ff3

View File

@ -3112,7 +3112,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
} else if (CastOp->getOpcode() == Instruction::Or) {
// Change: and (cast (or X, C1) to T), C2
// into : trunc(C1)&C2 iff trunc(C1)&C2 == C2
Constant *C3 = ConstantExpr::getBitCast(AndCI, I.getType());
Constant *C3 = ConstantExpr::getTrunc(AndCI, I.getType());
if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS) // trunc(C1)&C2
return ReplaceInstUsesWith(I, AndRHS);
}