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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 05:54:15 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()) {
----------------
fhahn wrote:

Yep, added an analysis remark. I am not sure if missed-vectorization would be accurate, because this is for cases where we would create a dead vector loop and should not even try to vectorize.

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


More information about the llvm-commits mailing list