[PATCH] D88735: [SLP] Also try to vectorize incoming values of PHIs .

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 12:48:50 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7604-7609
+      // Try to vectorize the incoming values of the PHI, to catch reductions
+      // that feed into PHIs.
+      for (unsigned I = 0, E = P->getNumIncomingValues(); I != E; I++) {
+        Changed |= vectorizeRootInstruction(nullptr, P->getIncomingValue(I),
+                                            P->getIncomingBlock(I), R, TTI);
       }
----------------
ABataev wrote:
> I would add a check here that we're going to vectorize the incoming values from a different basic block only, it is better to postpone vectorization of the values from the current basic block. It may reduce the compile time, I assume.
Thanks, I added a continue if the incoming block matches the current one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88735



More information about the llvm-commits mailing list