https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58372
--- Comment #36 from Terry Guo <xuepeng.guo at intel dot com> ---
(In reply to Uroš Bizjak from comment #35)
>
> Actually, we can use crtl->stack_realign_processed to delay DRAP generation.
> The condition in the patch should be changed to:
>
> crtl->stack_realign_needed
> = INCOMING_STACK_BOUNDARY < crtl->stack_alignment_estimated;
> crtl->stack_realign_tried = crtl->stack_realign_needed;
>
> ---> if (crtl->stack_realign_processed && crtl->drap_reg == NULL_RTX)
> {
> rtx drap_rtx = targetm.calls.get_drap_rtx ();
>
> Can you please test this change? The testcase from Comment #23 does not fail
> for me.
OK. Do it right now.