[llvm] [LV] Add initial legality checks for ee loops with stores (PR #145663)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 03:26:39 PDT 2025


================
@@ -1207,8 +1208,16 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
     });
   }
 
-  if (!LAI->canVectorizeMemory())
-    return canVectorizeIndirectUnsafeDependences();
+  if (!LAI->canVectorizeMemory()) {
+    if (!hasUncountedExitWithSideEffects())
+      return canVectorizeIndirectUnsafeDependences();
+    reportVectorizationFailure(
+        "Cannot vectorize unsafe dependencies in early exit loop with "
----------------
fhahn wrote:

looks like there's missing test coverage for that code path?

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


More information about the llvm-commits mailing list