[llvm] [LV] Add initial legality checks for loops with unbound loads. (PR #152422)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 23:10:24 PDT 2025
================
@@ -445,6 +445,11 @@ class LoopVectorizationLegality {
/// Returns a list of all known histogram operations in the loop.
bool hasHistograms() const { return !Histograms.empty(); }
+ /// Returns the loads that need to be fault-only-first.
+ const SmallPtrSetImpl<const Instruction *> &getFaultOnlyFirstLoads() const {
+ return FaultOnlyFirstLoads;
+ }
----------------
lukel97 wrote:
Would `getFaultingLoads` be an accurate description? Loads that may fault due to not being deferenceable or alignment and so need to be handled via fault-only-first instructions. They may be non-unit strided in future.
https://github.com/llvm/llvm-project/pull/152422
More information about the llvm-commits
mailing list