@@ -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