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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 22:44:33 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;
+  }
----------------
fhahn wrote:

It's not clear to me what fault-only-first means here. Those are just unit strided loads that may not be dereferenceable and may not be aligned?

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


More information about the llvm-commits mailing list