[llvm] [LoopVectorize] Teach LoopVectorizationLegality about more early exits (PR #107004)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 02:13:29 PDT 2024


================
@@ -551,6 +602,17 @@ class LoopVectorizationLegality {
   /// (potentially) make a better decision on the maximum VF and enable
   /// the use of those function variants.
   bool VecCallVariantsFound = false;
+
+  /// Indicates whether this loop has a speculative early exit, i.e. an
+  /// uncountable exiting block that is not the latch.
+  bool HasSpeculativeEarlyExit = false;
+
+  /// Keep track of all the loop exiting blocks.
----------------
fhahn wrote:

Is this comment accurate? AFAICT they only keep track of a single countable and uncountable exiting block, *if* the backedge taken count is not computable. 

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


More information about the llvm-commits mailing list