[llvm] [RISCV] Fix missing scaling by LMUL in cost model (PR #73342)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 08:05:52 PST 2024
================
@@ -1163,7 +1165,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
auto LT = getTypeLegalizationCost(RetTy);
if (const auto *Entry = CostTableLookup(VectorIntrinsicCostTable,
ICA.getID(), LT.second))
- return LT.first * Entry->Cost;
+ return LT.first * TLI->getLMULCost(LT.second) * Entry->Cost;
----------------
preames wrote:
The cost table may be *wrong* and need updating, but the structure already accounts for LMUL scaling. We could also rethink the table (i.e. have a table for linearly scaled cases, and one for all others), but that's different from the way this patch approaches it.
https://github.com/llvm/llvm-project/pull/73342
More information about the llvm-commits
mailing list