mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 16:54:48 +00:00
Fix a bug in which a node could be added to the
worklist twice: UpdateNodeOperands could morph a new node into a node already on the worklist. We would then recalculate the NodeId for this existing node and add it to the worklist. The testcase is ARM/cse-libcalls.ll, the problem showing up once UpdateNodeOperands is taught to do CSE for calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c83889ad90
commit
20f04e9fdd
@ -272,9 +272,14 @@ SDNode *DAGTypeLegalizer::AnalyzeNewNode(SDNode *N) {
|
|||||||
&NewOps[0],
|
&NewOps[0],
|
||||||
NewOps.size()).getNode();
|
NewOps.size()).getNode();
|
||||||
|
|
||||||
N->setNodeId(N->getNumOperands()-NumProcessed);
|
// Calculate the NodeId if we haven't morphed into an existing node for
|
||||||
if (N->getNodeId() == ReadyToProcess)
|
// which it is already known.
|
||||||
Worklist.push_back(N);
|
if (N->getNodeId() == NewNode) {
|
||||||
|
N->setNodeId(N->getNumOperands()-NumProcessed);
|
||||||
|
if (N->getNodeId() == ReadyToProcess)
|
||||||
|
Worklist.push_back(N);
|
||||||
|
}
|
||||||
|
|
||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user