make selectnodeto set the nodeid to -1. This makes it more akin to
authorChris Lattner <sabre@nondot.org>
Tue, 23 Feb 2010 23:01:35 +0000 (23:01 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 23 Feb 2010 23:01:35 +0000 (23:01 +0000)
creating a new node then replacing uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97000 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index e67135028fc2adb7ad2c42eae4f2d2257296590d..f5e7000167e24e219ee5e87599702d472005b90a 100644 (file)
@@ -4553,7 +4553,10 @@ SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned MachineOpc,
 SDNode *SelectionDAG::SelectNodeTo(SDNode *N, unsigned MachineOpc,
                                    SDVTList VTs, const SDValue *Ops,
                                    unsigned NumOps) {
-  return MorphNodeTo(N, ~MachineOpc, VTs, Ops, NumOps);
+  N = MorphNodeTo(N, ~MachineOpc, VTs, Ops, NumOps);
+  // Reset the NodeID to -1.
+  N->setNodeId(-1);
+  return N;
 }
 
 SDNode *SelectionDAG::MorphNodeTo(SDNode *N, unsigned Opc,