@@ -2088,9 +2088,6 @@ class GeneratedRTChecks {
2088
2088
Pred->getTerminator()->replaceSuccessorWith(LoopVectorPreHeader,
2089
2089
SCEVCheckBlock);
2090
2090
2091
- DT->addNewBlock(SCEVCheckBlock, Pred);
2092
- DT->changeImmediateDominator(LoopVectorPreHeader, SCEVCheckBlock);
2093
-
2094
2091
BranchInst &BI =
2095
2092
*BranchInst::Create(Bypass, LoopVectorPreHeader, SCEVCheckCond);
2096
2093
if (AddBranchWeights)
@@ -2115,8 +2112,6 @@ class GeneratedRTChecks {
2115
2112
Pred->getTerminator()->replaceSuccessorWith(LoopVectorPreHeader,
2116
2113
MemCheckBlock);
2117
2114
2118
- DT->addNewBlock(MemCheckBlock, Pred);
2119
- DT->changeImmediateDominator(LoopVectorPreHeader, MemCheckBlock);
2120
2115
MemCheckBlock->moveBefore(LoopVectorPreHeader);
2121
2116
2122
2117
BranchInst &BI =
@@ -2556,13 +2551,9 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
2556
2551
}
2557
2552
2558
2553
// Create new preheader for vector loop.
2559
- LoopVectorPreHeader =
2560
- SplitBlock(TCCheckBlock, TCCheckBlock->getTerminator(), DT, LI, nullptr,
2561
- "vector.ph");
2562
-
2563
- assert(DT->properlyDominates(DT->getNode(TCCheckBlock),
2564
- DT->getNode(Bypass)->getIDom()) &&
2565
- "TC check is expected to dominate Bypass");
2554
+ LoopVectorPreHeader = SplitBlock(TCCheckBlock, TCCheckBlock->getTerminator(),
2555
+ static_cast<DominatorTree *>(nullptr), LI,
2556
+ nullptr, "vector.ph");
2566
2557
2567
2558
BranchInst &BI =
2568
2559
*BranchInst::Create(Bypass, LoopVectorPreHeader, CheckMinIters);
@@ -7957,13 +7948,10 @@ EpilogueVectorizerMainLoop::emitIterationCountCheck(BasicBlock *Bypass,
7957
7948
7958
7949
// Create new preheader for vector loop.
7959
7950
LoopVectorPreHeader = SplitBlock(TCCheckBlock, TCCheckBlock->getTerminator(),
7960
- DT, LI, nullptr, "vector.ph");
7951
+ static_cast<DominatorTree *>(nullptr), LI,
7952
+ nullptr, "vector.ph");
7961
7953
7962
7954
if (ForEpilogue) {
7963
- assert(DT->properlyDominates(DT->getNode(TCCheckBlock),
7964
- DT->getNode(Bypass)->getIDom()) &&
7965
- "TC check is expected to dominate Bypass");
7966
-
7967
7955
LoopBypassBlocks.push_back(TCCheckBlock);
7968
7956
7969
7957
// Save the trip count so we don't have to regenerate it in the
@@ -8067,10 +8055,6 @@ EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(
8067
8055
8068
8056
assert(EPI.TripCount &&
8069
8057
"Expected trip count to have been saved in the first pass.");
8070
- assert(
8071
- (!isa<Instruction>(EPI.TripCount) ||
8072
- DT->dominates(cast<Instruction>(EPI.TripCount)->getParent(), Insert)) &&
8073
- "saved trip count does not dominate insertion point.");
8074
8058
Value *TC = EPI.TripCount;
8075
8059
IRBuilder<> Builder(Insert->getTerminator());
8076
8060
Value *Count = Builder.CreateSub(TC, EPI.VectorTripCount, "n.vec.remaining");
0 commit comments