[llvm] [LV] Vectorize early exit loops with stores using masking (PR #178454)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 29 08:02:04 PST 2026


================
@@ -8670,8 +8683,10 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlan(VFRange &Range) {
       MapVector<PHINode *, RecurrenceDescriptor>(),
       SmallPtrSet<const PHINode *, 1>(), SmallPtrSet<PHINode *, 1>(),
       /*AllowReordering=*/false);
-  VPlanTransforms::handleEarlyExits(*Plan,
-                                    /*HasUncountableExit*/ false);
+  VPlanTransforms::handleEarlyExits(
+      *Plan,
+      /*HasUncountableExit*/ false,
+      /*HasUncountableExitWithSideEffects=*/false);
----------------
huntergr-arm wrote:

IIRC, there's no proper checking for early exits in place for outer loop autovec yet, so it will likely break even before my work. We don't do that automatically though, it's driven by the user adding a pragma to an outer loop.

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


More information about the llvm-commits mailing list