[llvm] [RISCV][TTI] Scale the cost of intrinsic stepvector with LMUL (PR #87301)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 23:49:46 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);
----------------
arcbbb wrote:
No, not typically. I just recalled the case in #83294
https://github.com/llvm/llvm-project/pull/87301
More information about the llvm-commits
mailing list