diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index b28c3d949c96a..2342c8bfa502e 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -7508,8 +7508,7 @@ DenseMap 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"); // After vectorization, the exit blocks of the original loop will have // additional predecessors. Invalidate SCEVs for the exit phis in case SE diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp index d634ade306c19..35518c069bb3c 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp @@ -31,7 +31,6 @@ namespace { class VPlanVerifier { const VPDominatorTree &VPDT; VPTypeAnalysis &TypeInfo; - bool VerifyLate; SmallPtrSet WrappedIRBBs; @@ -62,9 +61,8 @@ class VPlanVerifier { bool verifyRegionRec(const VPRegionBlock *Region); public: - VPlanVerifier(VPDominatorTree &VPDT, VPTypeAnalysis &TypeInfo, - bool VerifyLate) - : VPDT(VPDT), TypeInfo(TypeInfo), VerifyLate(VerifyLate) {} + VPlanVerifier(VPDominatorTree &VPDT, VPTypeAnalysis &TypeInfo) + : VPDT(VPDT), TypeInfo(TypeInfo) {} bool verify(const VPlan &Plan); }; @@ -119,7 +117,7 @@ bool VPlanVerifier::verifyPhiRecipes(const VPBasicBlock *VPBB) { RecipeI++; } - if (!VerifyLate && NumActiveLaneMaskPhiRecipes > 1) { + if (!VPBB->getPlan()->isUnrolled() && NumActiveLaneMaskPhiRecipes > 1) { errs() << "There should be no more than one VPActiveLaneMaskPHIRecipe"; return false; } @@ -456,9 +454,9 @@ bool VPlanVerifier::verify(const VPlan &Plan) { return true; } -bool llvm::verifyVPlanIsValid(const VPlan &Plan, bool VerifyLate) { +bool llvm::verifyVPlanIsValid(const VPlan &Plan) { VPDominatorTree VPDT(const_cast(Plan)); VPTypeAnalysis TypeInfo(Plan); - VPlanVerifier Verifier(VPDT, TypeInfo, VerifyLate); + VPlanVerifier Verifier(VPDT, TypeInfo); return Verifier.verify(Plan); } diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.h b/llvm/lib/Transforms/Vectorize/VPlanVerifier.h index ccf79e8e5c985..ba17312d03799 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.h +++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.h @@ -29,16 +29,13 @@ namespace llvm { class VPlan; -/// Verify invariants for general VPlans. If \p VerifyLate is passed, skip some -/// checks that are not applicable at later stages of the transform pipeline. -/// Currently it checks the following: +/// Verify invariants for general VPlans. Currently it checks the following: /// 1. Region/Block verification: Check the Region/Block verification /// invariants for every region in the H-CFG. /// 2. all phi-like recipes must be at the beginning of a block, with no other /// recipes in between. Note that currently there is still an exception for /// VPBlendRecipes. -LLVM_ABI_FOR_TEST bool verifyVPlanIsValid(const VPlan &Plan, - bool VerifyLate = false); +LLVM_ABI_FOR_TEST bool verifyVPlanIsValid(const VPlan &Plan); } // namespace llvm