[llvm] [VPlan] Assert vplan-verify-each result and get verifier passing (PR #182254)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 22 08:07:53 PST 2026


================
@@ -7512,8 +7512,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
                         State.CFG.PrevBB->getSingleSuccessor(), &BestVPlan);
   VPlanTransforms::removeDeadRecipes(BestVPlan);
 
-  assert(verifyVPlanIsValid(BestVPlan, true /*VerifyLate*/) &&
-         "final VPlan is invalid");
+  assert(verifyVPlanIsValid(BestVPlan) && "final VPlan is invalid");
----------------
fhahn wrote:

Yep, `verifyFunction` for IR similarly just returns a boolean, instead of reporting a fatal error: https://github.com/llvm/llvm-project/blob/58ac25e3f0dc772689dd35ece24c1e8159be523b/llvm/lib/IR/Verifier.cpp#L7885

It is used in asserts so those won't raise a fatal error in release builds (e.g. the assert used in LV). If the verifier is enabled to run after each pass, that raises a fatal error.

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


More information about the llvm-commits mailing list