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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 08:34:02 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(
----------------
lukel97 wrote:

>  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.

I think that's reasonable. We should probably also consolidate all the different memory costing hooks that can go into getIntrinsicInstrCost? E.g.

- getMaskedMemoryOpCost -> llvm.masked.load/store
- getGatherScatterOpCost ->  llvm.masked.gather/scatter
- getExpandCompressMemoryOpCost -> llvm.masked.expandload/llvm.masked.compressstore
- getStridedMemoryOpCost -> llvm.experimental.vp.strided.load/store

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


More information about the llvm-commits mailing list