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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 05:26:24 PDT 2022


ABataev added inline comments.


================
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) &&
----------------
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. 


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