From 456c7ef68e13b9dedd12a2333e01b6fdbc534b0a Mon Sep 17 00:00:00 2001 From: LiaoChunyu Date: Mon, 5 Sep 2022 23:57:53 +0800 Subject: [PATCH] [InstSimplify][NFC] shortened the code --- llvm/lib/Analysis/InstructionSimplify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index aad8acf..27ec7a0 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -3131,9 +3131,9 @@ static Value *simplifyICmpWithBinOpOnLHS(CmpInst::Predicate Pred, if (match(LBO, m_Sub(m_APInt(C), m_Specific(RHS)))) { if ((*C & 1) == 1) { if (Pred == CmpInst::ICMP_EQ) - return ConstantInt::getFalse(getCompareTy(RHS)); + return getFalse(ITy); if (Pred == CmpInst::ICMP_NE) - return ConstantInt::getTrue(getCompareTy(RHS)); + return getTrue(ITy); } } -- 2.7.4