[llvm] [SLP]Initial support for non-power-of-2 (but still whole register) number of elements in operands. (PR #107273)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 12:09:47 PDT 2024


================
@@ -2466,7 +2496,9 @@ class BoUpSLP {
         }
         // TODO: Check if we can remove a check for non-power-2 number of
         // scalars after full support of non-power-2 vectorization.
-        return UniqueValues.size() != 2 && has_single_bit(UniqueValues.size());
+        return UniqueValues.size() != 2 &&
+               hasFullVectorsOnly(*R.TTI, (*UniqueValues.begin())->getType(),
----------------
alexey-bataev wrote:

Currently no, it will regress some code. I 'll restore an original check here and will update it later

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


More information about the llvm-commits mailing list