[llvm] [LV] Add initial legality checks for loops with unbound loads. (PR #152422)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 01:17:59 PDT 2025


================
@@ -85,10 +85,11 @@ LLVM_ABI bool isDereferenceableAndAlignedInLoop(
     AssumptionCache *AC = nullptr,
     SmallVectorImpl<const SCEVPredicate *> *Predicates = nullptr);
 
-/// Return true if the loop \p L cannot fault on any iteration and only
-/// contains read-only memory accesses.
-LLVM_ABI bool isDereferenceableReadOnlyLoop(
+/// Returns true if the only potentially faulting operations in loop are loads.
+/// Also collect loads that are not guaranteed to be dereferenceable.
+LLVM_ABI bool isLoopSafeWithLoadOnlyFaults(
----------------
arcbbb wrote:

Updated. Thanks!

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


More information about the llvm-commits mailing list