[llvm] [LAA][NFC] Refactor deref no-wrap check; expose broken reverse-loop bounds (PR #211960)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 05:31:44 PDT 2026
================
@@ -268,54 +276,60 @@ static bool evaluatePtrAddRecAtMaxBTCWillNotWrap(
MaxBTC = SE.getNoopOrZeroExtend(MaxBTC, WiderTy);
// For the computations below, make sure they don't unsigned wrap.
- if (!SE.isKnownPredicate(CmpInst::ICMP_UGE, AR->getStart(), StartPtr))
+ // FIXME: for a negative step this holds the HIGHEST accessed address, not
+ // the lowest
+ const SCEV *LowestAddr = AR->getStart();
----------------
antoniofrighetto wrote:
It would still be incorrect for the negative-step path, though? I also think it would be cleaner to keep StartOffset here (and possibly introduce the new name in the fix PR).
https://github.com/llvm/llvm-project/pull/211960
More information about the llvm-commits
mailing list