[PATCH] D98714: [SLP] Add insertelement instructions to vectorizable tree

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 11:04:50 PDT 2021


anton-afanasyev marked 3 inline comments as done.
anton-afanasyev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2624
   // Don't handle vectors.
-  if (S.OpValue->getType()->isVectorTy()) {
+  if (S.OpValue->getType()->isVectorTy() && !isa<InsertElementInst>(VL[0])) {
     LLVM_DEBUG(dbgs() << "SLP: Gathering due to vector type.\n");
----------------
ABataev wrote:
> `VL[0]`->`S.OpValue`
Yes, thanks.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2905-2906
+      BS.cancelScheduling(VL, VL0);
+      if (allSameType(Operands) || allConstant(Operands))
+        buildTree_rec(Operands, Depth, UserTreeIdx);
+      return;
----------------
ABataev wrote:
> The first check must be always true here, no?
Yes, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98714



More information about the llvm-commits mailing list