Skip to content

Commit eedc2c8

Browse files
committed
[LV] Remove now obsolete DT updates of scalar exit block.
Remove manual DT updates of scalar exit blocks during legacy skeleton creation, as they are not needed after 99d6c6d. This fixes DT verification failures with expensive checks, including https://lab.llvm.org/buildbot/#/builders/16/builds/1270.
1 parent 8ec9840 commit eedc2c8

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,12 +2873,6 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
28732873

28742874
// Update dominator for Bypass & LoopExit (if needed).
28752875
DT->changeImmediateDominator(Bypass, TCCheckBlock);
2876-
if (!Cost->requiresScalarEpilogue(VF.isVector()))
2877-
// If there is an epilogue which must run, there's no edge from the
2878-
// middle block to exit blocks and thus no need to update the immediate
2879-
// dominator of the exit blocks.
2880-
DT->changeImmediateDominator(LoopExitBlock, TCCheckBlock);
2881-
28822876
BranchInst &BI =
28832877
*BranchInst::Create(Bypass, LoopVectorPreHeader, CheckMinIters);
28842878
if (hasBranchWeightMD(*OrigLoop->getLoopLatch()->getTerminator()))
@@ -7611,14 +7605,8 @@ EpilogueVectorizerMainLoop::emitIterationCountCheck(BasicBlock *Bypass,
76117605
DT->getNode(Bypass)->getIDom()) &&
76127606
"TC check is expected to dominate Bypass");
76137607

7614-
// Update dominator for Bypass & LoopExit.
7608+
// Update dominator for Bypass.
76157609
DT->changeImmediateDominator(Bypass, TCCheckBlock);
7616-
if (!Cost->requiresScalarEpilogue(EPI.EpilogueVF.isVector()))
7617-
// For loops with multiple exits, there's no edge from the middle block
7618-
// to exit blocks (as the epilogue must run) and thus no need to update
7619-
// the immediate dominator of the exit blocks.
7620-
DT->changeImmediateDominator(LoopExitBlock, TCCheckBlock);
7621-
76227610
LoopBypassBlocks.push_back(TCCheckBlock);
76237611

76247612
// Save the trip count so we don't have to regenerate it in the

0 commit comments

Comments
 (0)