Correctly resize the Parts array.
llvm-svn: 55471
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 83fe4f5..34878f3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -4014,7 +4014,7 @@
unsigned NumRegs = TLI->getNumRegisters(ValueVT);
MVT RegisterVT = RegVTs[Value];
- Parts.resize(NumRegs);
+ Parts.resize(Part + NumRegs);
for (unsigned i = 0; i != NumRegs; ++i) {
SDValue P;
if (Flag == 0)