mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-13 14:46:15 +00:00
some random cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130237 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3443493cc7
commit
5036ce4a64
@ -1384,9 +1384,9 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||
|
||||
if (Value *NegVal = dyn_castNegVal(BOp1))
|
||||
return new ICmpInst(ICI.getPredicate(), BOp0, NegVal);
|
||||
else if (Value *NegVal = dyn_castNegVal(BOp0))
|
||||
if (Value *NegVal = dyn_castNegVal(BOp0))
|
||||
return new ICmpInst(ICI.getPredicate(), NegVal, BOp1);
|
||||
else if (BO->hasOneUse()) {
|
||||
if (BO->hasOneUse()) {
|
||||
Value *Neg = Builder->CreateNeg(BOp1);
|
||||
Neg->takeName(BO);
|
||||
return new ICmpInst(ICI.getPredicate(), BOp0, Neg);
|
||||
@ -2483,9 +2483,8 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
|
||||
}
|
||||
|
||||
// (X&Z) == (Y&Z) -> (X^Y) & Z == 0
|
||||
if (Op0->hasOneUse() && Op1->hasOneUse() &&
|
||||
match(Op0, m_And(m_Value(A), m_Value(B))) &&
|
||||
match(Op1, m_And(m_Value(C), m_Value(D)))) {
|
||||
if (match(Op0, m_OneUse(m_And(m_Value(A), m_Value(B)))) &&
|
||||
match(Op1, m_OneUse(m_And(m_Value(C), m_Value(D))))) {
|
||||
Value *X = 0, *Y = 0, *Z = 0;
|
||||
|
||||
if (A == C) {
|
||||
@ -2506,6 +2505,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
|
||||
return &I;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user