From: Chris Lattner Date: Tue, 23 Feb 2010 23:01:35 +0000 (+0000) Subject: make selectnodeto set the nodeid to -1. This makes it more akin to X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5857e0add8ab25825628d1ef19cec027e605dcd5;p=oota-llvm.git make selectnodeto set the nodeid to -1. This makes it more akin to creating a new node then replacing uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97000 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index e67135028fc..f5e7000167e 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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,