Skip to content

Commit 4e828f8

Browse files
committed
[VPlan] Perform DT expensive input DT verification earlier (NFC).
After 6c8f41d, DT adjustments for the skeleton are applied as VPBBs are executed. Move input DT verification up before starting to execute any VPBBs to avoid checking DT while the CFG and DT are in an incomplete state. This fixes a number of verification failures with expensive checks enabled, including https://lab.llvm.org/buildbot/#/builders/16/builds/10584
1 parent 33b910c commit 4e828f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7774,6 +7774,10 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
77747774
VPTransformState State(&TTI, BestVF, BestUF, LI, DT, ILV.Builder, &ILV,
77757775
&BestVPlan, Legal->getWidestInductionType());
77767776

7777+
#ifdef EXPENSIVE_CHECKS
7778+
assert(DT->verify(DominatorTree::VerificationLevel::Fast));
7779+
#endif
7780+
77777781
// 0. Generate SCEV-dependent code into the preheader, including TripCount,
77787782
// before making any changes to the CFG.
77797783
if (!BestVPlan.getPreheader()->empty()) {
@@ -7794,10 +7798,6 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
77947798
if (VectorizingEpilogue)
77957799
VPlanTransforms::removeDeadRecipes(BestVPlan);
77967800

7797-
#ifdef EXPENSIVE_CHECKS
7798-
assert(DT->verify(DominatorTree::VerificationLevel::Fast));
7799-
#endif
7800-
78017801
// Only use noalias metadata when using memory checks guaranteeing no overlap
78027802
// across all iterations.
78037803
const LoopAccessInfo *LAI = ILV.Legal->getLAI();

0 commit comments

Comments
 (0)