[llvm] [LV] Add initial legality checks for loops with unbound loads. (PR #152422)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 00:51:06 PDT 2025
================
@@ -843,6 +843,10 @@ class TargetTransformInfo {
/// Return true if the target supports strided load.
LLVM_ABI bool isLegalStridedLoadStore(Type *DataType, Align Alignment) const;
+ /// Return true if the target supports fault-only-first load.
+ LLVM_ABI bool isLegalFaultOnlyFirstLoad(Type *DataType,
----------------
fhahn wrote:
You will also need to implement the cost of the intrinsics. Why not just check the cost of those instead of adding another hook that will have overlap with computing the intrinsic cost?
There is general lowering for the intrinsics, so to me it seems this only boils down to whether the cost of the first-faulting loads is small?
https://github.com/llvm/llvm-project/pull/152422
More information about the llvm-commits
mailing list