[llvm] [SLP][REVEC] Support more mask pattern usage in shufflevector. (PR #106212)

Han-Kuan Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 22:39:01 PDT 2024


================
@@ -318,12 +317,11 @@ static unsigned getShufflevectorNumGroups(ArrayRef<Value *> VL) {
           int Index;
           if (!SV->isExtractSubvectorMask(Index))
             return false;
-          for (int I : seq<int>(Index, Index + SV->getShuffleMask().size()))
-            ExtractionIndex.push_back(I);
+          UsedIndex.set(Index, Index + SV->getShuffleMask().size());
           return true;
         }))
       return 0;
-    if (!is_sorted(ExtractionIndex))
+    if (!UsedIndex.all())
----------------
HanKuanChen wrote:

Do you have an example? I am not sure what you mean.

https://github.com/llvm/llvm-project/pull/106212


More information about the llvm-commits mailing list