Fix a really scary bug that Nate found where we weren't deleting the right
authorChris Lattner <sabre@nondot.org>
Thu, 7 Apr 2005 00:30:13 +0000 (00:30 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 7 Apr 2005 00:30:13 +0000 (00:30 +0000)
elements auto of the autoCSE maps.

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

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 858b8ddab8eb7534e564f26e165726246c972377..ea87a64ff66ec5d7eb82ee7d4a32e5b67727501d 100644 (file)
@@ -241,7 +241,7 @@ void SelectionDAG::DeleteNodeIfDead(SDNode *N, void *NodeSet) {
   case ISD::SEXTLOAD:
   case ISD::ZEXTLOAD: {
     EVTStruct NN;
-    NN.Opcode = ISD::TRUNCSTORE;
+    NN.Opcode = N->getOpcode();
     NN.VT = N->getValueType(0);
     NN.EVT = cast<MVTSDNode>(N)->getExtraValueType();
     for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)