[llvm] [LV][RFC] Generating conditional VPBB that will be skip when the mask is inactive in VPlan. (PR #141900)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 23:48:24 PDT 2025


================
@@ -8907,6 +8912,9 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
   }
   VPlanTransforms::optimizeInductionExitUsers(*Plan, IVEndValues);
 
+  if (!PreferFlattenControlFlow || !TTI.preferFlattenControlFlow())
+    VPlanTransforms::optimizeConditionalVPBB(*Plan);
----------------
ElvisWang123 wrote:

Move after EVL insertion pass. This can help to remove `replaceHeaderMaskToEVL()`. Thanks!

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


More information about the llvm-commits mailing list