mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
More styalistic changes. No functionality change.
llvm-svn: 60401
This commit is contained in:
parent
0cb74d3d8e
commit
109da8c135
@ -4438,12 +4438,11 @@ Instruction *InstCombiner::FoldOrWithConstants(BinaryOperator &I, Value *Op,
|
||||
if (!CI1) return 0;
|
||||
|
||||
Value *V1 = 0, *C2 = 0;
|
||||
if (match(Op, m_And(m_Value(V1), m_Value(C2)))) {
|
||||
ConstantInt *CI2 = dyn_cast<ConstantInt>(C2);
|
||||
if (!CI2) return 0;
|
||||
if (!match(Op, m_And(m_Value(V1), m_ConstantInt(C2)))) return 0;
|
||||
|
||||
APInt Xor = CI1->getValue() ^ CI2->getValue();
|
||||
if (Xor.isAllOnesValue()) {
|
||||
if (!Xor.isAllOnesValue()) return 0;
|
||||
|
||||
if (V1 == B) {
|
||||
Instruction *NewOp =
|
||||
InsertNewInstBefore(BinaryOperator::CreateAnd(A, CI1), I);
|
||||
@ -4453,8 +4452,6 @@ Instruction *InstCombiner::FoldOrWithConstants(BinaryOperator &I, Value *Op,
|
||||
InsertNewInstBefore(BinaryOperator::CreateAnd(B, CI1), I);
|
||||
return BinaryOperator::CreateOr(NewOp, A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user