diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-12-13 01:00:59 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-12-13 01:00:59 +0000 |
commit | 7c29ae320a827facfbcc32b91d6d98c6b06e44ea (patch) | |
tree | da09d457a4d62f7e36de948a7d378e78856858fd | |
parent | efb9350360fe13284f9162fec884d16590da206a (diff) | |
download | external_llvm-7c29ae320a827facfbcc32b91d6d98c6b06e44ea.zip external_llvm-7c29ae320a827facfbcc32b91d6d98c6b06e44ea.tar.gz external_llvm-7c29ae320a827facfbcc32b91d6d98c6b06e44ea.tar.bz2 |
Fix weird typo which leads to unallocated memory access for nodes with 4 results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91233 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/DAGISelHeader.h | 3 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h index 6a2b166..7233f3f 100644 --- a/include/llvm/CodeGen/DAGISelHeader.h +++ b/include/llvm/CodeGen/DAGISelHeader.h @@ -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. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index abf36e5..c74a2e4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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; |