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

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 07:41:40 PDT 2024


================
@@ -8833,6 +8852,8 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
     } else if (!V1 && V2) {
       // Shuffle vector and tree node.
       unsigned VF = cast<FixedVectorType>(V2->getType())->getNumElements();
+      if (auto *VecTy = dyn_cast<FixedVectorType>(ScalarTy))
+        VF /= VecTy->getNumElements();
----------------
alexey-bataev wrote:

assertion. Better to have a function, doing this, to avoid duplication

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


More information about the llvm-commits mailing list