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

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 19:46:08 PDT 2025


================
@@ -425,6 +425,10 @@ class RISCVTargetLowering : public TargetLowering {
   /// alignment is legal.
   bool isLegalStridedLoadStore(EVT DataType, Align Alignment) const;
 
+  /// Return true if a fault-only-first load of the given result type and
+  /// alignment is legal.
+  bool isLegalFaultOnlyFirstLoad(EVT DataType, Align Alignment) const;
----------------
wangpc-pp wrote:

In SVE, this is `first-fault` loads. In RISC-V, this is `fault-only-first` loads.

To compromise this, we maybe use `isLegalFirstFaultLoad`? 😃 `FaultFirst` sounds like faulting will be the first thing, not trapping on first fault element.

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


More information about the llvm-commits mailing list