mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fix a bug which occurred with empty basic blocks
llvm-svn: 5982
This commit is contained in:
parent
08b4007a7c
commit
8f2c71cae2
@ -160,7 +160,7 @@ void PEI::saveCallerSavedRegisters(MachineFunction &Fn) {
|
||||
const TargetInstrInfo &TII = Fn.getTarget().getInstrInfo();
|
||||
for (MachineFunction::iterator FI = Fn.begin(), E = Fn.end(); FI != E; ++FI) {
|
||||
// If last instruction is a return instruction, add an epilogue
|
||||
if (TII.isReturn(FI->back()->getOpcode())) {
|
||||
if (!FI->empty() && TII.isReturn(FI->back()->getOpcode())) {
|
||||
MBB = FI; I = MBB->end()-1;
|
||||
|
||||
for (unsigned i = 0, e = RegsToSave.size(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user