diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index d3c31911d6774..fba728625b071 100644 --- a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -579,9 +579,18 @@ FunctionLoweringInfo::getOrCreateSwiftErrorVRegUseAt(const Instruction *I, const  const Value *  FunctionLoweringInfo::getValueFromVirtualReg(unsigned Vreg) {    if (VirtReg2Value.empty()) { +    SmallVector<EVT, 4> ValueVTs;      for (auto &P : ValueMap) { -      VirtReg2Value[P.second] = P.first; +      ValueVTs.clear(); +      ComputeValueVTs(*TLI, Fn->getParent()->getDataLayout(), +                      P.first->getType(), ValueVTs); +      unsigned Reg = P.second; +      for (EVT VT : ValueVTs) { +        unsigned NumRegisters = TLI->getNumRegisters(Fn->getContext(), VT); +        for (unsigned i = 0, e = NumRegisters; i != e; ++i) +          VirtReg2Value[Reg++] = P.first; +      }      }    } -  return VirtReg2Value[Vreg]; +  return VirtReg2Value.lookup(Vreg);  }  | 
