forked from OSchip/llvm-project
make sure dead token factor nodes are removed by the dag combiner.
llvm-svn: 26731
This commit is contained in:
parent
611f965820
commit
68ac09d5cb
|
@ -665,6 +665,7 @@ SDOperand DAGCombiner::visitTokenFactor(SDNode *N) {
|
||||||
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
|
||||||
SDOperand Op = N->getOperand(i);
|
SDOperand Op = N->getOperand(i);
|
||||||
if (Op.getOpcode() == ISD::TokenFactor && Op.hasOneUse()) {
|
if (Op.getOpcode() == ISD::TokenFactor && Op.hasOneUse()) {
|
||||||
|
AddToWorkList(Op.Val); // Remove dead node.
|
||||||
Changed = true;
|
Changed = true;
|
||||||
for (unsigned j = 0, e = Op.getNumOperands(); j != e; ++j)
|
for (unsigned j = 0, e = Op.getNumOperands(); j != e; ++j)
|
||||||
Ops.push_back(Op.getOperand(j));
|
Ops.push_back(Op.getOperand(j));
|
||||||
|
|
Loading…
Reference in New Issue