forked from OSchip/llvm-project
don't add flag nodes with chain results to the NowDeadNodes
list multiple times when MorphNodeTo can't be applied. llvm-svn: 99735
This commit is contained in:
parent
d5cb1ddb2c
commit
7aed1fb69d
|
@ -1614,8 +1614,9 @@ UpdateChainsAndFlags(SDNode *NodeToMatch, SDValue InputChain,
|
|||
CurDAG->ReplaceAllUsesOfValueWith(SDValue(FRN, FRN->getNumValues()-1),
|
||||
InputFlag, &ISU);
|
||||
|
||||
// If the node became dead, delete it.
|
||||
if (FRN->use_empty())
|
||||
// If the node became dead and we haven't already seen it, delete it.
|
||||
if (FRN->use_empty() &&
|
||||
!std::count(NowDeadNodes.begin(), NowDeadNodes.end(), FRN))
|
||||
NowDeadNodes.push_back(FRN);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue