mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Propagate DAG node ordering during type legalization and instruction selection
A node's ordering is only propagated during legalization if (a) the new node does not have an ordering (is not a CSE'd node), or (b) the new node has an ordering that is higher than the node being legalized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -785,8 +785,10 @@ void SelectionDAGISel::DoInstructionSelection() {
|
||||
if (ResNode == Node || Node->getOpcode() == ISD::DELETED_NODE)
|
||||
continue;
|
||||
// Replace node.
|
||||
if (ResNode)
|
||||
if (ResNode) {
|
||||
CurDAG->AssignOrdering(ResNode, CurDAG->GetOrdering(Node));
|
||||
ReplaceUses(Node, ResNode);
|
||||
}
|
||||
|
||||
// If after the replacement this node is not used any more,
|
||||
// remove this dead node.
|
||||
|
Reference in New Issue
Block a user