aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-07 22:31:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-07 22:31:28 +0000
commit27af5c414b44315676b4625dc22e29a507ca9dca (patch)
treef3bb69a69fba3252194ede2fe04d636331d28abd /lib/CodeGen/IfConversion.cpp
parent468502e41a1b4cefe353a583e27005b75580d0a2 (diff)
downloadexternal_llvm-27af5c414b44315676b4625dc22e29a507ca9dca.zip
external_llvm-27af5c414b44315676b4625dc22e29a507ca9dca.tar.gz
external_llvm-27af5c414b44315676b4625dc22e29a507ca9dca.tar.bz2
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
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r--lib/CodeGen/IfConversion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index 64f2faf..2b03abe 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/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));