Fix weird typo which leads to unallocated memory access for nodes with 4 results.
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 13 Dec 2009 01:00:59 +0000 (01:00 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 13 Dec 2009 01:00:59 +0000 (01:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91233 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/DAGISelHeader.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 6a2b166c99a9537371267cd3d8d7959a264268ee..7233f3f0d8d510f050922a76a3e9eb2af6a36179 100644 (file)
@@ -110,8 +110,7 @@ void SelectRoot(SelectionDAG &DAG) {
     DAG.setSubgraphColor(Node, "red");
 #endif
     SDNode *ResNode = Select(SDValue(Node, 0));
-    // If node should not be replaced, 
-    // continue with the next one.
+    // If node should not be replaced, continue with the next one.
     if (ResNode == Node)
       continue;
     // Replace node.
index abf36e5401dc7a215deeb2793fdbac7d5b59aee7..c74a2e45c1f7bf5dc19adfd7b322061acdb96960 100644 (file)
@@ -4177,7 +4177,7 @@ SDVTList SelectionDAG::getVTList(EVT VT1, EVT VT2, EVT VT3, EVT VT4) {
                           I->VTs[2] == VT3 && I->VTs[3] == VT4)
       return *I;
 
-  EVT *Array = Allocator.Allocate<EVT>(3);
+  EVT *Array = Allocator.Allocate<EVT>(4);
   Array[0] = VT1;
   Array[1] = VT2;
   Array[2] = VT3;