[llvm] [ConstraintElimination] Add eq/ne facts to signed constraint system (PR #121423)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 23:51:48 PST 2025
================
@@ -1580,10 +1594,20 @@ static bool checkOrAndOpImpliedByOther(
void ConstraintInfo::addFact(CmpInst::Predicate Pred, Value *A, Value *B,
unsigned NumIn, unsigned NumOut,
SmallVectorImpl<StackEntry> &DFSInStack) {
+ addFactImpl(Pred, A, B, NumIn, NumOut, DFSInStack, false);
+ // If the Pred is eq/ne, also add the fact to signed system.
+ if (Pred == ICmpInst::ICMP_EQ || Pred == ICmpInst::ICMP_NE)
----------------
dtcxzyw wrote:
```suggestion
if (ICmpInst::isEquality(Pred))
```
https://github.com/llvm/llvm-project/pull/121423
More information about the llvm-commits
mailing list