[llvm] [VPlan] Simplify Plan's entry in removeBranchOnConst. (PR #154510)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 00:21:52 PDT 2025


================
@@ -7220,6 +7223,12 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   VPlanTransforms::optimizeForVFAndUF(BestVPlan, BestVF, BestUF, PSE);
   VPlanTransforms::simplifyRecipes(BestVPlan);
   VPlanTransforms::removeBranchOnConst(BestVPlan);
+  if (BestVPlan.getEntry()->getSingleSuccessor() ==
+      BestVPlan.getScalarPreheader()) {
----------------
ayalz wrote:

We have a TODO here too; wondering if the message should specify that vectorization is dead or never executes - due to insufficient trip-count.

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


More information about the llvm-commits mailing list