forked from OSchip/llvm-project
[SimplifyCFG] SwitchToLookupTable(): don't insert a DomTree edge that already exists
SI is the terminator of BB, so the edge we are adding obviously already existed. Indeed, this change does not have a test coverage change. This failure has been exposed in an existing test coverage by a follow-up patch that switches to lazy domtreeupdater mode, and removes domtree verification from SimplifyCFGOpt::simplifyOnce()/SimplifyCFGOpt::run(), IOW it does not appear feasible to add dedicated test coverage here.
This commit is contained in:
parent
278a3ea1b2
commit
c22bc5f1f8
|
@ -5973,7 +5973,6 @@ static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> &Builder,
|
|||
RangeCheckBranch =
|
||||
Builder.CreateCondBr(Cmp, LookupBB, SI->getDefaultDest());
|
||||
Updates.push_back({DominatorTree::Insert, BB, LookupBB});
|
||||
Updates.push_back({DominatorTree::Insert, BB, SI->getDefaultDest()});
|
||||
}
|
||||
|
||||
// Populate the BB that does the lookups.
|
||||
|
|
Loading…
Reference in New Issue