[PATCH] D119679: [SLP] Prohibit vectorization of externally used intermediate insertelements

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 01:26:29 PST 2022


anton-afanasyev marked an inline comment as done.
anton-afanasyev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4046
 
+      // Prohibit external uses for intermediate inserts
+      // TODO: this could be allowed by shuffling vectorized value
----------------
ABataev wrote:
> I would try to do this a bit earlier and simpler. Before calling `tryToVectorizePair` (or something like this) it is just enough to check that one of the instructions is insertelement. And just do not try vectorization in this case.
Ok, done this way. Though need to keep in mind other paths for inserts get to `buildTree()`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119679



More information about the llvm-commits mailing list