[llvm] [LV] Initial support for stores in early exit loops (PR #137774)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri May 9 07:28:01 PDT 2025
================
@@ -407,6 +407,13 @@ class LoopVectorizationLegality {
return hasUncountableEarlyExit() ? getUncountableEdge()->second : nullptr;
}
+ /// Returns true if this is an early exit loop containing a store.
+ bool isConditionCopyRequired() const { return RequiresEarlyExitConditionCopy; }
----------------
david-arm wrote:
Can the store be anywhere in the loop, i.e. including after the early exit? Might be worth clarifying.
If we do stick with this code in the final version I think it probably needs a better name because it's not obvious that it specifically refers to the condition driving an early exit. How would this scale with multiple exits?
https://github.com/llvm/llvm-project/pull/137774
More information about the llvm-commits
mailing list