mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
Teach isCSRestore() that ARM/Thumb2 functions will use post-modify LDR
instructions to restore a single register rather than an LDM instruction. rdar://8754999 llvm-svn: 121498
This commit is contained in:
parent
e3924a3c85
commit
4a414e1973
@ -92,6 +92,11 @@ static bool isCSRestore(MachineInstr *MI,
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
if ((MI->getOpcode() == ARM::LDR_POST ||
|
||||
MI->getOpcode() == ARM::t2LDR_POST) &&
|
||||
isCalleeSavedRegister(MI->getOperand(0).getReg(), CSRegs) &&
|
||||
MI->getOperand(1).getReg() == ARM::SP)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user