[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:36:03 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:

p.s. For forward progress, I would suggest this patch just drop the intrinsic table case and we handle that in a separate PR.

https://github.com/llvm/llvm-project/pull/73342


More information about the llvm-commits mailing list