forked from OSchip/llvm-project
[InstSimplify][NFC] shortened the code
This commit is contained in:
parent
5e9522c311
commit
456c7ef68e
|
@ -3131,9 +3131,9 @@ static Value *simplifyICmpWithBinOpOnLHS(CmpInst::Predicate Pred,
|
||||||
if (match(LBO, m_Sub(m_APInt(C), m_Specific(RHS)))) {
|
if (match(LBO, m_Sub(m_APInt(C), m_Specific(RHS)))) {
|
||||||
if ((*C & 1) == 1) {
|
if ((*C & 1) == 1) {
|
||||||
if (Pred == CmpInst::ICMP_EQ)
|
if (Pred == CmpInst::ICMP_EQ)
|
||||||
return ConstantInt::getFalse(getCompareTy(RHS));
|
return getFalse(ITy);
|
||||||
if (Pred == CmpInst::ICMP_NE)
|
if (Pred == CmpInst::ICMP_NE)
|
||||||
return ConstantInt::getTrue(getCompareTy(RHS));
|
return getTrue(ITy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue