Revert r58489. It isn't correct for all cases.
llvm-svn: 58523
This commit is contained in:
parent
21c9705264
commit
d2bc13380f
|
|
@ -273,10 +273,10 @@ void PEI::saveCalleeSavedRegisters(MachineFunction &Fn) {
|
|||
MBB = FI;
|
||||
I = MBB->end(); --I;
|
||||
|
||||
// Skip over all "return" instructions, which are part of the return
|
||||
// Skip over all terminator instructions, which are part of the return
|
||||
// sequence.
|
||||
MachineBasicBlock::iterator I2 = I;
|
||||
while (I2 != MBB->begin() && (--I2)->getDesc().isReturn())
|
||||
while (I2 != MBB->begin() && (--I2)->getDesc().isTerminator())
|
||||
I = I2;
|
||||
|
||||
bool AtStart = I == MBB->begin();
|
||||
|
|
|
|||
|
|
@ -850,7 +850,8 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF,
|
|||
while (MBBI != MBB.begin()) {
|
||||
MachineBasicBlock::iterator PI = prior(MBBI);
|
||||
unsigned Opc = PI->getOpcode();
|
||||
if (Opc != X86::POP32r && Opc != X86::POP64r && !PI->getDesc().isReturn())
|
||||
if (Opc != X86::POP32r && Opc != X86::POP64r &&
|
||||
!PI->getDesc().isTerminator())
|
||||
break;
|
||||
--MBBI;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue