[llvm] [SLP][REVEC] Make getExtractWithExtendCost support FixedVectorType as Dst. (PR #134822)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 8 03:53:20 PDT 2025
================
@@ -5399,6 +5399,25 @@ static InstructionCost getVectorInstrCost(
ScalarUserAndIdx);
}
+/// This is similar to TargetTransformInfo::getExtractWithExtendCost, but if Dst
+/// is a FixedVectorType, a vector will be extracted instead of a scalar.
+static InstructionCost getExtractWithExtendCost(const TargetTransformInfo &TTI,
+ unsigned Opcode, Type *Dst,
+ VectorType *VecTy,
+ unsigned Index) {
+ if (auto *ScalarTy = dyn_cast<FixedVectorType>(Dst)) {
+ assert(SLPReVec && "Only supported by REVEC.");
+ TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
----------------
alexey-bataev wrote:
Pass it as argument of the function
https://github.com/llvm/llvm-project/pull/134822
More information about the llvm-commits
mailing list