1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Fix incorect Register -> MCRegister conversion

getReg returns a Register which may represent a virtual register.
This commit is contained in:
Fangrui Song 2020-10-08 21:38:17 -07:00
parent dd75275a41
commit ff30c5884e

View File

@ -93,7 +93,7 @@ bool TargetLowering::parametersInCSRMatch(const MachineRegisterInfo &MRI,
SDValue Value = OutVals[I];
if (Value->getOpcode() != ISD::CopyFromReg)
return false;
MCRegister ArgReg = cast<RegisterSDNode>(Value->getOperand(1))->getReg();
Register ArgReg = cast<RegisterSDNode>(Value->getOperand(1))->getReg();
if (MRI.getLiveInPhysReg(ArgReg) != Reg)
return false;
}