File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2082,6 +2082,9 @@ class GeneratedRTChecks {
2082
2082
2083
2083
auto *Pred = LoopVectorPreHeader->getSinglePredecessor ();
2084
2084
BranchInst::Create (LoopVectorPreHeader, SCEVCheckBlock);
2085
+ // Create new preheader for vector loop.
2086
+ if (OuterLoop)
2087
+ OuterLoop->addBasicBlockToLoop (SCEVCheckBlock, *LI);
2085
2088
2086
2089
SCEVCheckBlock->getTerminator ()->eraseFromParent ();
2087
2090
SCEVCheckBlock->moveBefore (LoopVectorPreHeader);
@@ -2119,6 +2122,9 @@ class GeneratedRTChecks {
2119
2122
DT->changeImmediateDominator (LoopVectorPreHeader, MemCheckBlock);
2120
2123
MemCheckBlock->moveBefore (LoopVectorPreHeader);
2121
2124
2125
+ if (OuterLoop)
2126
+ OuterLoop->addBasicBlockToLoop (MemCheckBlock, *LI);
2127
+
2122
2128
BranchInst &BI =
2123
2129
*BranchInst::Create (Bypass, LoopVectorPreHeader, MemRuntimeCheckCond);
2124
2130
if (AddBranchWeights) {
You can’t perform that action at this time.
0 commit comments