summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-01-08 02:36:12 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-01-08 02:36:12 +0000
commit58ec4fec88541e06d518a26bd47f26a42d20644b (patch)
tree8295bbc10ee25f20f2743793e166f82e844a956c /llvm/lib/CodeGen/SelectionDAG
parentd1e76b957bf94d986ba1e2c1614cbad82eaf94d0 (diff)
downloadbcm5719-llvm-58ec4fec88541e06d518a26bd47f26a42d20644b.tar.gz
bcm5719-llvm-58ec4fec88541e06d518a26bd47f26a42d20644b.zip
ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
llvm-svn: 92988
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 10dcc09c8ec..c87e4bf716a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -459,7 +459,8 @@ void SelectionDAGISel::ShrinkDemandedOps() {
SDNode *N = Worklist.pop_back_val();
if (N->use_empty() && N != CurDAG->getRoot().getNode()) {
- CurDAG->DeleteNode(N);
+ if (N->getOpcode() != ISD::DELETED_NODE)
+ CurDAG->DeleteNode(N);
continue;
}
OpenPOWER on IntegriCloud