[llvm] [SLP][REVEC] Make ShuffleCostEstimator and ShuffleInstructionBuilder support vector instructions. (PR #99499)
Han-Kuan Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 07:18:09 PDT 2024
================
@@ -9172,12 +9172,30 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
}
Vals.push_back(Constant::getNullValue(V->getType()));
}
+ if (auto *VecTy = dyn_cast<FixedVectorType>(Vals.front()->getType())) {
+ // When REVEC is enabled, we need to expand vector types into scalar
+ // types.
+ unsigned VecTyNumElements = VecTy->getNumElements();
+ SmallVector<Constant *> NewVals;
+ NewVals.reserve(VL.size() * VecTyNumElements);
----------------
HanKuanChen wrote:
1. It should be VF because `for (Value *V : VL.take_front(VF))`
2. I use nullptr here.
https://github.com/llvm/llvm-project/pull/99499
More information about the llvm-commits
mailing list