[llvm] 456c7ef - [InstSimplify][NFC] shortened the code
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 5 08:58:43 PDT 2022
Author: LiaoChunyu
Date: 2022-09-05T23:57:53+08:00
New Revision: 456c7ef68e13b9dedd12a2333e01b6fdbc534b0a
URL: https://github.com/llvm/llvm-project/commit/456c7ef68e13b9dedd12a2333e01b6fdbc534b0a
DIFF: https://github.com/llvm/llvm-project/commit/456c7ef68e13b9dedd12a2333e01b6fdbc534b0a.diff
LOG: [InstSimplify][NFC] shortened the code
Added:
Modified:
llvm/lib/Analysis/InstructionSimplify.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index aad8acfad839..27ec7a0f350f 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);
}
}
More information about the llvm-commits
mailing list