[PATCH] D149936: [LAA] Don't require stride one for inbounds GEP

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 01:28:14 PDT 2023


nikic created this revision.
nikic added reviewers: reames, fhahn.
Herald added subscribers: StephenFan, hiraditya, arichardson.
Herald added a project: All.
nikic requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

I'm pretty sure I'm missing something here, but I'm not sure what it is... As far as I can tell, if we have an inbounds GEP, then we don't need the stride to be 1 or -1 specifically to assume it doesn't wrap in a nusw sense. If it wraps, then we will go from one half of the address space to the other, and no allocated object can be that large (or at least, using inbounds on such an object is not legal).

This is still WIP as some additional test updates are needed.


https://reviews.llvm.org/D149936

Files:
  llvm/lib/Analysis/LoopAccessAnalysis.cpp
  llvm/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-gather-scatter.ll
  llvm/test/Transforms/LoopVectorize/X86/pr54634.ll
  llvm/test/Transforms/LoopVersioning/wrapping-pointer-versioning.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149936.519764.patch
Type: text/x-patch
Size: 29291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230505/a9388086/attachment.bin>


More information about the llvm-commits mailing list