summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-13 18:37:30 +0000
committerChris Lattner <sabre@nondot.org>2006-03-13 18:37:30 +0000
commit68ac09d5cbca225912df7adba73f3c8a18e67e08 (patch)
tree2a564026ef6395801de553ab2c445d3447491be4 /llvm
parent611f9658204e036515569e57653e3a3d1b165771 (diff)
downloadbcm5719-llvm-68ac09d5cbca225912df7adba73f3c8a18e67e08.tar.gz
bcm5719-llvm-68ac09d5cbca225912df7adba73f3c8a18e67e08.zip
make sure dead token factor nodes are removed by the dag combiner.
llvm-svn: 26731
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 33b046c3670..b388d830f36 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -665,6 +665,7 @@ SDOperand DAGCombiner::visitTokenFactor(SDNode *N) {
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
SDOperand Op = N->getOperand(i);
if (Op.getOpcode() == ISD::TokenFactor && Op.hasOneUse()) {
+ AddToWorkList(Op.Val); // Remove dead node.
Changed = true;
for (unsigned j = 0, e = Op.getNumOperands(); j != e; ++j)
Ops.push_back(Op.getOperand(j));
OpenPOWER on IntegriCloud