Instruction Selection makes use of the topological ordering of nodes by node
id (a node's operands have smaller node id than it) when doing cycle detection.
During selection we may violate this property as a selection of multiple nodes
may induce a use dependence (and thus a node id restriction) between two
unrelated nodes. If a selected node has an unselected successor this
may allow us to miss a cycle in detection an invalid selection.
This patch fixes this by marking all unselected successors of a selected node have negated node id.
We avoid pruning on such negative ids but still can reconstruct the original id for pruning.
In-tree targets have been updated to replace DAG-level replacements with ISel-level ones which enforce this property.
This preemptively fixes PR36312 before triggering commit r324359 relands