isLowRegister() expects input is a physical register.

llvm-svn: 34013
This commit is contained in:
Evan Cheng 2007-02-07 21:44:33 +00:00
parent a0e49f2ead
commit 2ff4c973b1
1 changed files with 2 additions and 2 deletions

View File

@ -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)