diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-01-08 02:36:12 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-01-08 02:36:12 +0000 |
commit | 6f279e0bda35a35740cc8c5479d579890bc1d3f7 (patch) | |
tree | 08d556290ff7debfe8c6104fd50dcb50927cb422 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | b093bd0565b1f5c93c2696f6ec712b2e61551c5b (diff) |
ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 10dcc09c8e..c87e4bf716 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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; } |