[llvm] [RISCV][TTI] Scale the cost of intrinsic stepvector with LMUL (PR #87301)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 20:33:50 PDT 2024
================
@@ -860,11 +860,13 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
break;
}
// TODO: add more intrinsic
- case Intrinsic::experimental_stepvector: {
- unsigned Cost = 1; // vid
- auto LT = getTypeLegalizationCost(RetTy);
- return Cost + (LT.first - 1);
- }
+ case Intrinsic::experimental_stepvector:
+ if (ST->hasVInstructions()) {
+ auto LT = getTypeLegalizationCost(RetTy);
----------------
lukel97 wrote:
Do we ever reach here without `+v` and need to return the scalarized cost?
https://github.com/llvm/llvm-project/pull/87301
More information about the llvm-commits
mailing list