[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:11:57 PDT 2024


================
@@ -3390,7 +3423,8 @@ class BoUpSLP {
     Last->State = EntryState;
     // FIXME: Remove once support for ReuseShuffleIndices has been implemented
     // for non-power-of-two vectors.
-    assert((has_single_bit(VL.size()) || ReuseShuffleIndices.empty()) &&
+    assert((hasFullVectorsOnly(*TTI, getValueType(VL.front()), VL.size()) ||
----------------
alexey-bataev wrote:

This is not reordering, this is reusing of the same scalars. The test checks it (see `[[TMP1:%.*]] = shufflevector <6 x i64> [[TMP0]], <6 x i64> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 0, i32 0>`)

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


More information about the llvm-commits mailing list