mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
More styalistic changes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60401 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4438,22 +4438,19 @@ Instruction *InstCombiner::FoldOrWithConstants(BinaryOperator &I, Value *Op,
|
|||||||
if (!CI1) return 0;
|
if (!CI1) return 0;
|
||||||
|
|
||||||
Value *V1 = 0, *C2 = 0;
|
Value *V1 = 0, *C2 = 0;
|
||||||
if (match(Op, m_And(m_Value(V1), m_Value(C2)))) {
|
if (!match(Op, m_And(m_Value(V1), m_ConstantInt(C2)))) return 0;
|
||||||
ConstantInt *CI2 = dyn_cast<ConstantInt>(C2);
|
|
||||||
if (!CI2) return 0;
|
|
||||||
|
|
||||||
APInt Xor = CI1->getValue() ^ CI2->getValue();
|
APInt Xor = CI1->getValue() ^ CI2->getValue();
|
||||||
if (Xor.isAllOnesValue()) {
|
if (!Xor.isAllOnesValue()) return 0;
|
||||||
if (V1 == B) {
|
|
||||||
Instruction *NewOp =
|
if (V1 == B) {
|
||||||
InsertNewInstBefore(BinaryOperator::CreateAnd(A, CI1), I);
|
Instruction *NewOp =
|
||||||
return BinaryOperator::CreateOr(NewOp, B);
|
InsertNewInstBefore(BinaryOperator::CreateAnd(A, CI1), I);
|
||||||
} else if (V1 == A) {
|
return BinaryOperator::CreateOr(NewOp, B);
|
||||||
Instruction *NewOp =
|
} else if (V1 == A) {
|
||||||
InsertNewInstBefore(BinaryOperator::CreateAnd(B, CI1), I);
|
Instruction *NewOp =
|
||||||
return BinaryOperator::CreateOr(NewOp, A);
|
InsertNewInstBefore(BinaryOperator::CreateAnd(B, CI1), I);
|
||||||
}
|
return BinaryOperator::CreateOr(NewOp, A);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user