[llvm] [VPlan] Handle early exit before forming regions. (NFC) (PR #138393)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 11:22:53 PDT 2025


================
@@ -9383,7 +9383,8 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
   VPlanTransforms::prepareForVectorization(
       *Plan, Legal->getWidestInductionType(), PSE, RequiresScalarEpilogueCheck,
       CM.foldTailByMasking(), OrigLoop,
-      getDebugLocFromInstOrOperands(Legal->getPrimaryInduction()));
+      getDebugLocFromInstOrOperands(Legal->getPrimaryInduction()),
+      Legal->hasUncountableEarlyExit(), Range);
----------------
ayalz wrote:

Ah, thanks for clarifying!
"If it is false, it means there are no uncountable early exits, i.e., all early exits are countable which requires a scalar epilogue."

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


More information about the llvm-commits mailing list