[PATCH] D114087: [SLP]Improve registering and merging of compatible shuffles.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 12:03:11 PST 2021


vporpo added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6816
 
-  // Perform O(N^2) search over the gather sequences and merge identical
+  // Less defined shuffles can be replaced by the more defined copies.
+  auto &&IsIdenticalOrLessDefined = [this](Instruction *I1, Instruction *I2,
----------------
ABataev wrote:
> vporpo wrote:
> > nit: Could you briefly explain in the comment what you mean by  "less defined" by showing for example two masks where one is less defined than the other (like the ones from the lit tests below).
> For example, if we have 2 shuffles:
> ```
> shuffle %0, <0, 0, 0, undef>
> ```
> and 
> ```
> shuffle %0, <0, 0, 0, 0>
> ```
> the first shuffle is less defined than the second and can be replaced by the second one.
Could you add this explanation to the comment?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114087



More information about the llvm-commits mailing list