[llvm] [SLP][REVEC] Make ShuffleCostEstimator and ShuffleInstructionBuilder can vectorize vector instructions. (PR #99606)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 10:13:18 PDT 2024


================
@@ -8728,6 +8744,15 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
       }
       return TTI::TCC_Free;
     };
+    auto GetVF = [&](Value *V) {
+      unsigned VNumElements =
+          cast<FixedVectorType>(V->getType())->getNumElements();
+      assert(VNumElements > ScalarTyNumElements &&
+             "the number of elements of V is not large enough");
+      assert(VNumElements % ScalarTyNumElements == 0 &&
----------------
alexey-bataev wrote:

What if ScalarTyNumElements is non-power-of-2, can it happen?

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


More information about the llvm-commits mailing list