[llvm] InstSimplify: teach simplifyICmpWithConstant about samesign (PR #125899)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 18:23:45 PST 2025
================
@@ -3012,7 +3012,7 @@ static Value *simplifyICmpWithConstant(CmpPredicate Pred, Value *LHS,
}
// Rule out tautological comparisons (eg., ult 0 or uge 0).
- ConstantRange RHS_CR = ConstantRange::makeExactICmpRegion(Pred, *C);
+ ConstantRange RHS_CR = ConstantRange::makeAllowedICmpRegion(Pred, *C);
----------------
dtcxzyw wrote:
While it doesn't change the outcome, it changes the semantics. We expect `makeExactICmpRegion` to return an exact result instead of a superset.
Can we change `makeExactICmpRegion` to support `samesign`?
https://github.com/llvm/llvm-project/pull/125899
More information about the llvm-commits
mailing list