forked from OSchip/llvm-project
Fix regression on 400.perlbench last night.
llvm-svn: 32486
This commit is contained in:
parent
67d1c8ae0e
commit
ade1f6894d
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue