[llvm] [LV] Add initial legality checks for ee loops with stores (PR #145663)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 07:12:55 PDT 2025
================
@@ -407,6 +407,14 @@ class LoopVectorizationLegality {
return hasUncountableEarlyExit() ? getUncountableEdge()->second : nullptr;
}
+ /// Returns true if this is an early exit loop containing a store.
+ bool isConditionCopyRequired() const { return EarlyExitLoad.has_value(); }
+
+ /// Returns the load instruction, if any, directly used for an exit comparison
+ /// in and early exit loop containing state-changing or potentially-faulting
+ /// operations.
----------------
david-arm wrote:
Given we already have support for vectorising early exit loops with loads in them, I think the name `getEarlyExitLoad` could be confusing. It also makes it sound like there is only one load in the loop. How about something like `getCriticalLoadInUncountableEarlyExit`? The problem is that we support vectorising loops with countable early exits so we have to be specific what we mean.
https://github.com/llvm/llvm-project/pull/145663
More information about the llvm-commits
mailing list