GlobalISel: Use correct calling convention in handleAssignments

This was using the calling convention of the calling function, not the
callee. Avoids regressions in a future patch.
This commit is contained in:
Matt Arsenault 2021-02-08 16:53:42 -05:00
parent bcf723b2fd
commit 87e280110d
1 changed files with 2 additions and 2 deletions

View File

@ -260,12 +260,12 @@ bool CallLowering::handleAssignments(CCState &CCInfo,
continue;
MVT NewVT = TLI->getRegisterTypeForCallingConv(
F.getContext(), F.getCallingConv(), EVT(CurVT));
F.getContext(), CCInfo.getCallingConv(), EVT(CurVT));
// If we need to split the type over multiple regs, check it's a scenario
// we currently support.
unsigned NumParts = TLI->getNumRegistersForCallingConv(
F.getContext(), F.getCallingConv(), CurVT);
F.getContext(), CCInfo.getCallingConv(), CurVT);
if (NumParts == 1) {
// Try to use the register type if we couldn't assign the VT.