https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140
--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #12)
> Looking into it.
At the beginning of ix86_expand_epilogue, we have:
m->fs.sp_valid = (!frame_pointer_needed
|| (crtl->sp_is_unchanging
&& !stack_realign_fp));
so, we can say in a similar way at the end of the ix86_expand_prologue:
m->fs.sp_valid = !frame_pointer_needed;
Justas, can you please test the following patch:
--cut here--
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c6c66c7..9c3fa70 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -13065,6 +13065,8 @@ ix86_expand_prologue (void)
m->fs.fp_valid = true;
}
+ m->fs.sp_valid = !frame_pointer_needed;
+
if (!int_registers_saved)
ix86_emit_save_regs_using_mov (frame.reg_save_offset);
if (!sse_registers_saved)
--cut here--