This wasn't looking at the right instruction, and would always fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283640
91177308-0d34-0410-b5e6-
96231b3b80d8
}
MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
- assert(MBBI == MBB.end() &&
+ assert(MBBI->getDesc().isReturn() &&
"Can only insert epilog into returning blocks");
+
DebugLoc DL = MBBI->getDebugLoc();
const MachineFrameInfo &MFI = MF.getFrameInfo();
const AVRMachineFunctionInfo *AFI = MF.getInfo<AVRMachineFunctionInfo>();