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

Simeon K via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 08:36:47 PST 2023


================
@@ -1082,7 +1083,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
     // These all use the same code.
     auto LT = getTypeLegalizationCost(RetTy);
     if (!LT.second.isVector() && TLI->isOperationCustom(ISD::FCEIL, LT.second))
-      return LT.first * 8;
+      return LT.first * TLI->getLMULCost(LT.second) * 8;
----------------
simeonkr wrote:

Thanks for catching this.

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


More information about the llvm-commits mailing list