[llvm] [SLP][REVEC] Make ShuffleCostEstimator and ShuffleInstructionBuilder can vectorize vector instructions. (PR #99606)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 24 04:11:02 PDT 2024
================
@@ -8728,6 +8744,16 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
}
return TTI::TCC_Free;
};
+ auto GetVF = [&](Value *V) {
+ unsigned VNumElements =
+ cast<FixedVectorType>(V->getType())->getNumElements();
+ assert(VNumElements > ScalarTyNumElements &&
+ VNumElements % ScalarTyNumElements == 0);
+ // V1 and V2 would be the argument of shufflevector.
+ // The maximum index of Mask should be (VNumElements * 2) - 1.
+ assert(VNumElements <= 2 * ScalarTyNumElements * Mask.size());
----------------
alexey-bataev wrote:
Add assertion message
https://github.com/llvm/llvm-project/pull/99606
More information about the llvm-commits
mailing list