mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Avoid creating duplicate CFG edges in the IfConversion pass.
Patch by Stefan Hepp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3755e7fa2
commit
dd4fc446b5
@ -1557,7 +1557,7 @@ void IfConverter::MergeBlocks(BBInfo &ToBBI, BBInfo &FromBBI, bool AddEdges) {
|
||||
if (Succ == FallThrough)
|
||||
continue;
|
||||
FromBBI.BB->removeSuccessor(Succ);
|
||||
if (AddEdges)
|
||||
if (AddEdges && !ToBBI.BB->isSuccessor(Succ))
|
||||
ToBBI.BB->addSuccessor(Succ);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user