Skip to content

Commit 3849017

Browse files
Merge pull request #19582 from bgogul/merge_di_bugfix
Fix the dominator patching logic in mergeBasicBlockWithSuccessor.
2 parents 3a558f0 + c375910 commit 3849017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Utils/CFG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ bool swift::mergeBasicBlockWithSuccessor(SILBasicBlock *BB, DominanceInfo *DT,
757757
auto *BBNode = DT->getNode(BB);
758758
SmallVector<DominanceInfoNode *, 8> Children(SuccBBNode->begin(),
759759
SuccBBNode->end());
760-
for (auto *ChildNode : *SuccBBNode)
760+
for (auto *ChildNode : Children)
761761
DT->changeImmediateDominator(ChildNode, BBNode);
762762

763763
DT->eraseNode(SuccBB);

0 commit comments

Comments
 (0)