mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
this can be trunc or bitcast, per line 3092.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32487 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
078b631ff3
commit
bb4e7b2fa4
@ -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::getTrunc(AndCI, I.getType());
|
||||
Constant *C3 = ConstantExpr::getTruncOrBitCast(AndCI,I.getType());
|
||||
if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS) // trunc(C1)&C2
|
||||
return ReplaceInstUsesWith(I, AndRHS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user