mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
isLowRegister() expects input is a physical register.
llvm-svn: 34013
This commit is contained in:
parent
43d0b955a3
commit
dc15bc54a4
@ -218,14 +218,14 @@ MachineInstr *ARMRegisterInfo::foldMemoryOperand(MachineInstr *MI,
|
||||
case ARM::tMOVrr: {
|
||||
if (OpNum == 0) { // move -> store
|
||||
unsigned SrcReg = MI->getOperand(1).getReg();
|
||||
if (!isLowRegister(SrcReg))
|
||||
if (isPhysicalRegister(SrcReg) && !isLowRegister(SrcReg))
|
||||
// tSpill cannot take a high register operand.
|
||||
break;
|
||||
NewMI = BuildMI(TII.get(ARM::tSpill)).addReg(SrcReg).addFrameIndex(FI)
|
||||
.addImm(0);
|
||||
} else { // move -> load
|
||||
unsigned DstReg = MI->getOperand(0).getReg();
|
||||
if (!isLowRegister(DstReg))
|
||||
if (isPhysicalRegister(DstReg) && !isLowRegister(DstReg))
|
||||
// tRestore cannot target a high register operand.
|
||||
break;
|
||||
NewMI = BuildMI(TII.get(ARM::tRestore), DstReg).addFrameIndex(FI)
|
||||
|
Loading…
Reference in New Issue
Block a user