[llvm-commits] [llvm] r91233 - in /llvm/trunk: include/llvm/CodeGen/DAGISelHeader.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sat Dec 12 17:00:59 PST 2009
Author: asl
Date: Sat Dec 12 19:00:59 2009
New Revision: 91233
URL: http://llvm.org/viewvc/llvm-project?rev=91233&view=rev
Log:
Fix weird typo which leads to unallocated memory access for nodes with 4 results.
Modified:
llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=91233&r1=91232&r2=91233&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Sat Dec 12 19:00:59 2009
@@ -110,8 +110,7 @@
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.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=91233&r1=91232&r2=91233&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Dec 12 19:00:59 2009
@@ -4177,7 +4177,7 @@
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;
More information about the llvm-commits
mailing list