projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e9522c
)
[InstSimplify][NFC] shortened the code
author
LiaoChunyu
<chunyu@iscas.ac.cn>
Mon, 5 Sep 2022 15:57:53 +0000
(23:57 +0800)
committer
LiaoChunyu
<chunyu@iscas.ac.cn>
Mon, 5 Sep 2022 15:57:53 +0000
(23:57 +0800)
llvm/lib/Analysis/InstructionSimplify.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/InstructionSimplify.cpp
b/llvm/lib/Analysis/InstructionSimplify.cpp
index aad8acfad839033ac0305b8c60a935f80ba3716c..27ec7a0f350f17692d5d5cbe8aefe5cb031f1b79 100644
(file)
--- 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
);
}
}