aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-07 07:22:45 +0000
committerChris Lattner <sabre@nondot.org>2008-12-07 07:22:45 +0000
commit1fb0debb488dd3f9beccc711fa1b3e776d557845 (patch)
treeee94e952e0b2e517f3db11a9f4a2503e45daa21a /lib/Transforms/Utils
parent70e8127ecd63b483e0aed512010aeb6155f8cc82 (diff)
downloadexternal_llvm-1fb0debb488dd3f9beccc711fa1b3e776d557845.zip
external_llvm-1fb0debb488dd3f9beccc711fa1b3e776d557845.tar.gz
external_llvm-1fb0debb488dd3f9beccc711fa1b3e776d557845.tar.bz2
fix a bug I introduced in simplifycfg handling single entry phi
nodes. FoldSingleEntryPHINodes deletes the PHI, so there is no need to delete it afterward. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index d6465f5..e7bd75e 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1102,7 +1102,6 @@ static bool FoldCondBranchOnPHI(BranchInst *BI) {
// Degenerate case of a single entry PHI.
if (PN->getNumIncomingValues() == 1) {
FoldSingleEntryPHINodes(PN->getParent());
- PN->eraseFromParent();
return true;
}