mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-05 02:07:16 +00:00
Only remove the edge from entry to false if false block is merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37503 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
468502e41a
commit
27af5c414b
@ -647,8 +647,8 @@ bool IfConverter::IfConvertTriangle(BBInfo &BBI) {
|
||||
// Now merge the entry of the triangle with the true block.
|
||||
BBI.NonPredSize -= TII->RemoveBranch(*BBI.BB);
|
||||
MergeBlocks(BBI, TrueBBI);
|
||||
// Remove entry to false edge.
|
||||
if (BBI.BB->isSuccessor(FalseBBI.BB))
|
||||
// Remove entry to false edge if false block is merged in as well.
|
||||
if (FalseBBDead && BBI.BB->isSuccessor(FalseBBI.BB))
|
||||
BBI.BB->removeSuccessor(FalseBBI.BB);
|
||||
std::copy(BBI.BrCond.begin(), BBI.BrCond.end(),
|
||||
std::back_inserter(BBI.Predicate));
|
||||
|
Loading…
Reference in New Issue
Block a user