[llvm] [Loads] Support dereference for non-constant offset (PR #149551)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 06:13:33 PDT 2025


annamthomas wrote:

ping. 

I think all comments are addressed but there are some doubts regarding usage of `getStartAndEndAccess` and we if need explicit overflow checks for `StartAccess`. Note that the overflow check for `EndAccess` is already done within that API. 

@fhahn, it seems there are different wrapping checks for usages of `getStartAndEndForAccess` API.  When generating runtime checks, SCEV predicates are added if wrapping cannot be proven. However, I don't see wrapping checks for  `MemoryDepChecker::isDependent` which uses `getStartAndEndAccess`.  

I think the same logic follows for  `isDereferenceableAndAlignedInLoop` as well because whatever we used to prove no-wrap or adding the required SCEV predicates (if we couldn't prove no-wrap) is already done before we reached `isDereferenceableAndAlignedInLoop`.



https://github.com/llvm/llvm-project/pull/149551


More information about the llvm-commits mailing list