[llvm] [SLP][REVEC] Make ShuffleCostEstimator and ShuffleInstructionBuilder support vector instructions. (PR #99499)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 06:33:22 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);
----------------
alexey-bataev wrote:
SmallVector<Constant *> NewVals(VL.size() * VecTyNumElements, PoisonValue::get());
https://github.com/llvm/llvm-project/pull/99499
More information about the llvm-commits
mailing list