[PATCH] D149742: [SLP]Improve isGatherShuffledEntry by trying per-register shuffle.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 05:06:29 PDT 2023


RKSimon added a comment.

I've done my best, but I'm really struggling to understand a lot of this patch :(



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7146
+  }
+  void estimateNodesPermuteCost(const TreeEntry &E1, const TreeEntry *E2,
+                                ArrayRef<int> Mask, unsigned Part,
----------------
Add method description, also why is it called estimateNodesPermuteCost when it doesn't seem to use/return costs?


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7155
+          (!E2 && InVectors.size() == 1 &&
+           InVectors.front().get<const TreeEntry *>() == &E1)) {
+        ArrayRef<int> SubMask =
----------------
This logic makes very little sense to me


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7647
+        else
+          Estimator.add(*TEs.front(), *TEs.back(), VecMask);
+      }
----------------
Would we be better off merging the 1TE + 2TE add() methods?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149742



More information about the llvm-commits mailing list