diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-06-07 22:31:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-06-07 22:31:28 +0000 |
commit | 1236ef7bccf25ead31e7a1ce242ab5566bc092fe (patch) | |
tree | 4b828d179a1f9c94e0631839063c7493b999fe49 | |
parent | 3f4c6fe7e85285ba01030a0a0563e81b4931b120 (diff) | |
download | bcm5719-llvm-1236ef7bccf25ead31e7a1ce242ab5566bc092fe.tar.gz bcm5719-llvm-1236ef7bccf25ead31e7a1ce242ab5566bc092fe.zip |
Only remove the edge from entry to false if false block is merged.
llvm-svn: 37503
-rw-r--r-- | llvm/lib/CodeGen/IfConversion.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index 64f2faf09de..2b03abecb99 100644 --- a/llvm/lib/CodeGen/IfConversion.cpp +++ b/llvm/lib/CodeGen/IfConversion.cpp @@ -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)); |