[llvm] [LVI][CVP] Treat undef as Unknown on abs (PR #68711)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 02:33:48 PDT 2023
================
@@ -479,7 +479,8 @@ static bool processAbsIntrinsic(IntrinsicInst *II, LazyValueInfo *LVI) {
// Is X in [0, IntMin]? NOTE: INT_MIN is fine!
Result = LVI->getPredicateAt(CmpInst::Predicate::ICMP_ULE, X, IntMin, II,
- /*UseBlockValue=*/true);
+ /*UseBlockValue=*/true,
+ /*UndefAllowed*/ IsIntMinPoison);
----------------
nikic wrote:
This would also allow using getConstantRangeAtUse(), which is probably more valuable anyway.
https://github.com/llvm/llvm-project/pull/68711
More information about the llvm-commits
mailing list