summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-02 18:15:10 +0000
committerChris Lattner <sabre@nondot.org>2004-04-02 18:15:10 +0000
commiteed034bcd3a8d28b5c526b4802576e421a6f56e1 (patch)
treedafc0b6b53290f995f16e5990358e40664a25d34 /llvm/lib
parent9f0db32625cacae2116847b2f2c5f80f1ed24bea (diff)
downloadbcm5719-llvm-eed034bcd3a8d28b5c526b4802576e421a6f56e1.tar.gz
bcm5719-llvm-eed034bcd3a8d28b5c526b4802576e421a6f56e1.zip
Fix the obvious bug in my previous checkin
llvm-svn: 12618
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index b606c58d527..9c3610830e1 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -701,6 +701,9 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
if (FVPN->getParent() == FalseSucc)
FalseValue = FVPN->getIncomingValueForBlock(BI->getParent());
+ TrueSucc->removePredecessor(BI->getParent());
+ FalseSucc->removePredecessor(BI->getParent());
+
// Insert a new select instruction.
Value *NewRetVal = new SelectInst(BI->getCondition(), TrueValue,
FalseValue, "retval", BI);
OpenPOWER on IntegriCloud