[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


================
@@ -1751,6 +1853,11 @@ bool LoopVectorizationLegality::isVectorizableEarlyExitLoop() {
                        "backedge taken count: "
                     << *SymbolicMaxBTC << '\n');
   UncountableEdge = SingleUncountableEdge;
+  if (HasStore) {
+    RequiresEarlyExitConditionCopy = true;
----------------
david-arm wrote:

Looks like these are always set as a pair, so perhaps there is no need for `RequiresEarlyExitConditionCopy` and you can just test if `EarlyExitLoad` has a value or not?

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


More information about the llvm-commits mailing list