[InstSimplify][NFC] shortened the code

This commit is contained in:
LiaoChunyu 2022-09-05 23:57:53 +08:00
parent 5e9522c311
commit 456c7ef68e
1 changed files with 2 additions and 2 deletions

View File

@ -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);
} }
} }