make sure dead token factor nodes are removed by the dag combiner.

llvm-svn: 26731
This commit is contained in:
Chris Lattner 2006-03-13 18:37:30 +00:00
parent 611f965820
commit 68ac09d5cb
1 changed files with 1 additions and 0 deletions

View File

@ -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));