@@ -611,9 +611,6 @@ class InnerLoopVectorizer {
611
611
// / Middle Block between the vector and the scalar.
612
612
BasicBlock *LoopMiddleBlock = nullptr ;
613
613
614
- // / A list of all bypass blocks. The first block is the entry of the loop.
615
- SmallVector<BasicBlock *, 4 > LoopBypassBlocks;
616
-
617
614
// / Trip count of the original loop.
618
615
Value *TripCount = nullptr ;
619
616
@@ -2445,7 +2442,6 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
2445
2442
if (hasBranchWeightMD (*OrigLoop->getLoopLatch ()->getTerminator ()))
2446
2443
setBranchWeights (BI, MinItersBypassWeights, /* IsExpected=*/ false );
2447
2444
ReplaceInstWithInst (TCCheckBlock->getTerminator (), &BI);
2448
- LoopBypassBlocks.push_back (TCCheckBlock);
2449
2445
2450
2446
assert (cast<VPIRBasicBlock>(Plan.getEntry ())->getIRBasicBlock () ==
2451
2447
TCCheckBlock &&
@@ -2461,9 +2457,6 @@ BasicBlock *InnerLoopVectorizer::emitSCEVChecks(BasicBlock *Bypass) {
2461
2457
assert ((!Cost->OptForSize ||
2462
2458
Cost->Hints ->getForce () == LoopVectorizeHints::FK_Enabled) &&
2463
2459
" Cannot SCEV check stride or overflow when optimizing for size" );
2464
- assert (!LoopBypassBlocks.empty () &&
2465
- " Should already be a bypass block due to iteration count check" );
2466
- LoopBypassBlocks.push_back (SCEVCheckBlock);
2467
2460
AddedSafetyChecks = true ;
2468
2461
2469
2462
introduceCheckBlockInVPlan (SCEVCheckBlock);
@@ -2499,7 +2492,6 @@ BasicBlock *InnerLoopVectorizer::emitMemRuntimeChecks(BasicBlock *Bypass) {
2499
2492
});
2500
2493
}
2501
2494
2502
- LoopBypassBlocks.push_back (MemCheckBlock);
2503
2495
2504
2496
AddedSafetyChecks = true ;
2505
2497
@@ -7557,8 +7549,6 @@ EpilogueVectorizerMainLoop::emitIterationCountCheck(BasicBlock *Bypass,
7557
7549
nullptr , " vector.ph" );
7558
7550
7559
7551
if (ForEpilogue) {
7560
- LoopBypassBlocks.push_back (TCCheckBlock);
7561
-
7562
7552
// Save the trip count so we don't have to regenerate it in the
7563
7553
// vec.epilog.iter.check. This is safe to do because the trip count
7564
7554
// generated here dominates the vector epilog iter check.
@@ -7619,13 +7609,6 @@ EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton() {
7619
7609
7620
7610
DT->changeImmediateDominator (LoopScalarPreHeader,
7621
7611
EPI.EpilogueIterationCountCheck );
7622
- // Keep track of bypass blocks, as they feed start values to the induction and
7623
- // reduction phis in the scalar loop preheader.
7624
- if (EPI.SCEVSafetyCheck )
7625
- LoopBypassBlocks.push_back (EPI.SCEVSafetyCheck );
7626
- if (EPI.MemSafetyCheck )
7627
- LoopBypassBlocks.push_back (EPI.MemSafetyCheck );
7628
- LoopBypassBlocks.push_back (EPI.EpilogueIterationCountCheck );
7629
7612
7630
7613
// The vec.epilog.iter.check block may contain Phi nodes from inductions or
7631
7614
// reductions which merge control-flow from the latch block and the middle
@@ -7696,7 +7679,6 @@ EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(
7696
7679
setBranchWeights (BI, Weights, /* IsExpected=*/ false );
7697
7680
}
7698
7681
ReplaceInstWithInst (Insert->getTerminator (), &BI);
7699
- LoopBypassBlocks.push_back (Insert);
7700
7682
7701
7683
// A new entry block has been created for the epilogue VPlan. Hook it in, as
7702
7684
// otherwise we would try to modify the entry to the main vector loop.
0 commit comments