[llvm] [RISCV][TTI] Implement vector costs for `llvm.fpto{u|s}i.sat()`. (PR #143655)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 2 03:25:52 PDT 2025


================
@@ -1497,6 +1497,33 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
                           cast<VectorType>(ICA.getArgTypes()[0]), {}, CostKind,
                           0, cast<VectorType>(ICA.getReturnType()));
   }
+  case Intrinsic::fptoui_sat:
----------------
arsenm wrote:

I don't really understand this giant mess of TTI interfaces. The default should include an estimate based on the default expansion, but that doesn't mean the default should be assume the cost is the default expansion. It needs to account for the target making the base operation legal 

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


More information about the llvm-commits mailing list