https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82221
--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> --- Try this one: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 4f0414ffa9d..ee27273c80d 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13801,6 +13801,7 @@ ix86_get_drap_rtx (void) /* We must use DRAP if there are outgoing arguments on stack and ACCUMULATE_OUTGOING_ARGS is false. */ if (ix86_force_drap + || !crtl->sp_is_unchanging || (cfun->machine->outgoing_args_on_stack && !ACCUMULATE_OUTGOING_ARGS)) crtl->need_drap = true; to see what the generated code looks like.