Fix a nasty bug from a previous patch of mine
authorChris Lattner <sabre@nondot.org>
Fri, 26 Aug 2005 00:13:12 +0000 (00:13 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 26 Aug 2005 00:13:12 +0000 (00:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23069 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index c3d1bb398e4591cadc9d5dccbe51e53a1935219e..9d7e5b1648a018d7e45a35aa095ca9c5752ccf09 100644 (file)
@@ -1042,7 +1042,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
   SDNode *N;
   if (VT != MVT::Flag) { // Don't CSE flag producing nodes
     SDNode *&E = UnaryOps[std::make_pair(Opcode, std::make_pair(Operand, VT))];
-    if (E) return SDOperand(N, 0);
+    if (E) return SDOperand(E, 0);
     E = N = new SDNode(Opcode, Operand);
   } else {
     N = new SDNode(Opcode, Operand);