[llvm] [RISCV] Fix missing scaling by LMUL in cost model (PR #73342)

Simeon K via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 06:10:14 PST 2024


================
@@ -1154,7 +1157,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
     auto LT = getTypeLegalizationCost(RetTy);
     unsigned VPISD = getISDForVPIntrinsicID(ICA.getID());
     if (TLI->isOperationCustom(VPISD, LT.second))
-      return Cost * LT.first;
+      return Cost * LT.first * TLI->getLMULCost(LT.second);
----------------
simeonkr wrote:

Thanks, I think it's correct now.

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


More information about the llvm-commits mailing list