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

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 00:01:49 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;
----------------
ShivaChen wrote:

Should only consider LMUL for vector type?

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


More information about the llvm-commits mailing list