[llvm] [SLP] Enable reordering for non-power-of-two vectors (PR #106638)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 12:52:00 PDT 2024


================
@@ -4824,6 +4817,12 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
   // representation is better than just gather.
   auto CheckForShuffledLoads = [&, &TTI = *TTI](Align CommonAlignment,
                                                 bool ProfitableGatherPointers) {
+    // The following code has not been updated for non-power-of-2 vectors.
+    // The splitting logic here does not cover the original vector if the
+    // vector factor is not a power of two.
+    if (!has_single_bit(VL.size()))
----------------
alexey-bataev wrote:

Add a FIXME

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


More information about the llvm-commits mailing list