Index: llvm/lib/Target/X86/X86FrameLowering.cpp =================================================================== --- llvm/lib/Target/X86/X86FrameLowering.cpp +++ llvm/lib/Target/X86/X86FrameLowering.cpp @@ -1649,14 +1649,16 @@ // Define the current CFA rule to use the provided offset. assert(StackSize); BuildCFI(MBB, MBBI, DL, - MCCFIInstruction::cfiDefCfaOffset(nullptr, -2 * stackGrowth), + MCCFIInstruction::cfiDefCfaOffset( + nullptr, -2 * stackGrowth + (int)TailCallArgReserveSize), MachineInstr::FrameSetup); // Change the rule for the FramePtr to be an "offset" rule. unsigned DwarfFramePtr = TRI->getDwarfRegNum(MachineFramePtr, true); BuildCFI(MBB, MBBI, DL, - MCCFIInstruction::createOffset(nullptr, DwarfFramePtr, - 2 * stackGrowth), + MCCFIInstruction::createOffset( + nullptr, DwarfFramePtr, + 2 * stackGrowth - (int)TailCallArgReserveSize), MachineInstr::FrameSetup); }