mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-23 15:29:51 +00:00
This transform is also performed by InstructionSimplify, remove the duplicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113608 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b28f579200
commit
0ca25608b9
@ -207,9 +207,6 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Instruction::Or:
|
case Instruction::Or:
|
||||||
if (Together == AndRHS) // (X | C) & C --> C
|
|
||||||
return ReplaceInstUsesWith(TheAnd, AndRHS);
|
|
||||||
|
|
||||||
if (Op->hasOneUse() && Together != OpRHS) {
|
if (Op->hasOneUse() && Together != OpRHS) {
|
||||||
// (X | C1) & C2 --> (X | (C1&C2)) & C2
|
// (X | C1) & C2 --> (X | (C1&C2)) & C2
|
||||||
Value *Or = Builder->CreateOr(X, Together);
|
Value *Or = Builder->CreateOr(X, Together);
|
||||||
|
Loading…
Reference in New Issue
Block a user