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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 08:30:52 PST 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6807
+        return false;
+    // Check if the second instruction is more defined than the first one.
+    NewMask.assign(SI2->getShuffleMask().begin(), SI2->getShuffleMask().end());
----------------
Add a comment about keep track of the terminating (trailing?) undefmaskelems


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6815
+      else
+        LastUndefsCnt = 0;
+      if (NewMask[I] != UndefMaskElem && SM1[I] != UndefMaskElem &&
----------------
ABataev wrote:
> RKSimon wrote:
> > I don't understand - why do you reset LastUndefsCnt here?
> `LastUndefsCnt` is the number of terminating undefmaskelems, that's why I reset it each time we ran into non-undef mask elem.
Got it - thanks.


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