[PATCH] D131894: [SLP]Try to vectorize single store operands.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 05:32:14 PDT 2022


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with one minor



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:12245
+        // Try to vectorize chain in store, if this is the only store to the
+        // address in the block.
+        if ((I == Stores.end() || I->second.size() == 1) &&
----------------
ABataev wrote:
> RKSimon wrote:
> > This comment suggests we're checking for aliasing of the pointer as well? But I thought this was supposed to be purely about the stored value having one use?
> I tried to reduce compile time effect with this change, so added another check that we have only single store in the basic block for the provided base pointer.
> The alternative solution is just enable `ShouldStartVectorizeHorAtStore` by default but it requires some extra work with side effect and compile time analysis. 
OK - please can you make it clear in the comment that this is purely to reduce compile time and that ShouldStartVectorizeHorAtStore could one day be switched on by default.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131894/new/

https://reviews.llvm.org/D131894



More information about the llvm-commits mailing list