@@ -2873,12 +2873,6 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
2873
2873
2874
2874
// Update dominator for Bypass & LoopExit (if needed).
2875
2875
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
-
2882
2876
BranchInst &BI =
2883
2877
*BranchInst::Create (Bypass, LoopVectorPreHeader, CheckMinIters);
2884
2878
if (hasBranchWeightMD (*OrigLoop->getLoopLatch ()->getTerminator ()))
@@ -7611,14 +7605,8 @@ EpilogueVectorizerMainLoop::emitIterationCountCheck(BasicBlock *Bypass,
7611
7605
DT->getNode (Bypass)->getIDom ()) &&
7612
7606
" TC check is expected to dominate Bypass" );
7613
7607
7614
- // Update dominator for Bypass & LoopExit .
7608
+ // Update dominator for Bypass.
7615
7609
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
-
7622
7610
LoopBypassBlocks.push_back (TCCheckBlock);
7623
7611
7624
7612
// Save the trip count so we don't have to regenerate it in the
0 commit comments