[llvm] [TTI][RISCV] Add cost modelling for intrinsic vp.load.ff (PR #160470)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 03:13:16 PDT 2025


================
@@ -1616,6 +1616,11 @@ class TargetTransformInfo {
       TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput,
       bool UseMaskForCond = false, bool UseMaskForGaps = false) const;
 
+  /// \return The cost of vp intrinsic vp.load.ff.
+  LLVM_ABI InstructionCost getFirstFaultLoadCost(
----------------
fhahn wrote:

> TIL that getVPMemoryOpCost actually exists. We don't use it in RISC-V, so it looks like it's dead. I've opened up a PR to remove it: https://github.com/llvm/llvm-project/pull/160838

This is exactly why I would argue we should try to adress the underlying issue, i.e. make `getIntrinsicInstrCost` powerful enough to serve the use cases, so we don't have to add various very specialized hooks when they are for intrinsics.

@arcbbb would probably have been good to wait a bit with merging while there was still an ongoing discussion

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


More information about the llvm-commits mailing list