[llvm] [SLP] Compute a shuffle mask for SK_InsertSubvector (PR #85408)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 08:25:17 PDT 2024


================
@@ -4328,9 +4328,12 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
               llvm_unreachable(
                   "Expected only consecutive, strided or masked gather loads.");
             }
+            SmallVector<int> ShuffleMask(VL.size());
+            for (int Idx : seq<int>(0, VL.size()))
+              ShuffleMask[i] = i / VF == I ? VL.size() + i % VF : i;
----------------
alexey-bataev wrote:

All `i`s must be replaced too

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


More information about the llvm-commits mailing list