[PATCH] D109020: [LoadStoreVectorizer] Make aliasing check more precise

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 13:30:52 PDT 2021


nikic created this revision.
nikic added reviewers: arsenm, volkan, bogner.
Herald added subscribers: jeroen.dobbelaere, hiraditya.
nikic requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

The load store vectorizer currently uses isNoAlias to determine whether memory-accessing instructions should prevent vectorization. However, this only works for loads and stores. Additionally, a couple of intrinsics like assume are special-cased to be ignored.

Instead use getModRefInfo() to generically determine whether the instruction accesses/modifies the relevant location. This will automatically handle all inaccessiblememonly intrinsics correctly (as well as other calls that don't modref for other reasons). This requires generalizing the code a bit, as it was previously only considering loads and stored in particular.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109020

Files:
  llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  llvm/test/Transforms/LoadStoreVectorizer/int_sideeffect.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109020.369777.patch
Type: text/x-patch
Size: 6365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210831/a8cf8e44/attachment.bin>


More information about the llvm-commits mailing list