X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FSelectionDAG%2FSelectionDAGISel.cpp;h=2f43222760c37f89e9eced8cdb068a8cc851d05a;hb=91ee5454ae8f15de769a7316b4c36734b6103e45;hp=34878f34425cc3768bdd6809a9d455ff15425271;hpb=c748ffa4e4408545b6adf102bfba52001f8a0a92;p=oota-llvm.git diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 34878f34425..2f43222760c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -4014,7 +4014,7 @@ SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG, unsigned NumRegs = TLI->getNumRegisters(ValueVT); MVT RegisterVT = RegVTs[Value]; - Parts.resize(Part + NumRegs); + Parts.resize(NumRegs); for (unsigned i = 0; i != NumRegs; ++i) { SDValue P; if (Flag == 0) @@ -4067,12 +4067,13 @@ SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG, } } - Parts[Part+i] = P; + Parts[i] = P; } - Values[Value] = getCopyFromParts(DAG, &Parts[Part], NumRegs, RegisterVT, + Values[Value] = getCopyFromParts(DAG, Parts.begin(), NumRegs, RegisterVT, ValueVT); Part += NumRegs; + Parts.clear(); } return DAG.getMergeValues(DAG.getVTList(&ValueVTs[0], ValueVTs.size()),