summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-18 16:48:45 +0000
committerChris Lattner <sabre@nondot.org>2009-03-18 16:48:45 +0000
commit514fc5b1435e7a5f70a80b6b27a0c9bb9bd5448d (patch)
treea65b9adbcb08091670455184294059ef9096a448 /llvm/lib
parent595923ff75b32342103ae5df688f91637d8f18f4 (diff)
downloadbcm5719-llvm-514fc5b1435e7a5f70a80b6b27a0c9bb9bd5448d.tar.gz
bcm5719-llvm-514fc5b1435e7a5f70a80b6b27a0c9bb9bd5448d.zip
aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
for pointing this out :) llvm-svn: 67212
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index ab8df698457..666db7e8d74 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -803,9 +803,9 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
" must have been a struct!");
Instruction *InsertPt = Call;
if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
- InsertPt = II->getNormalDest()->begin();
- assert(!isa<PHINode>(InsertPt) &&
- "Can't have a use of the invoke value if the edge is critical");
+ BasicBlock::iterator IP = II->getNormalDest()->begin();
+ while (isa<PHINode>(IP)) ++IP;
+ InsertPt = IP;
}
// We used to return a struct. Instead of doing smart stuff with all the
OpenPOWER on IntegriCloud