When we legalize target nodes, do not use getNode to create a new node,
authorChris Lattner <sabre@nondot.org>
Wed, 17 May 2006 18:00:08 +0000 (18:00 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 17 May 2006 18:00:08 +0000 (18:00 +0000)
commitc5d7d7c715f7b7a4eeea1ceaafefc3d1d6df2add
tree1d1cca500bc9b875530bffbc2da98afa8cf01d21
parentb248e16afd105fd8c01e08d8bf997b08ff08d127
When we legalize target nodes, do not use getNode to create a new node,
use UpdateNodeOperands to just update the operands!  This is important because
getNode will allocate a new node if the node returns a flag and this breaks
assumptions in the legalizer that you can legalize some things multiple times
and get exactly the same results.

This latent bug was exposed by my ppc patch last night, and this fixes
gsm/toast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28348 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp