diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index 830f207c676b3a..4d25129290f8c0 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -2178,9 +2178,8 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF, // Emit DWARF info specifying the restores of the callee-saved registers. // For epilogue with return inside or being other block without successor, // no need to generate .cfi_restore for callee-saved registers. - if (NeedsDwarfCFI && !MBB.succ_empty() && !MBB.isReturnBlock()) { + if (NeedsDwarfCFI && !MBB.succ_empty()) emitCalleeSavedFrameMoves(MBB, AfterPop, DL, false); - } if (Terminator == MBB.end() || !isTailCallOpcode(Terminator->getOpcode())) { // Add the return addr area delta back since we are not tail calling.