From: Eric Botcazou Date: Tue, 19 Feb 2019 09:25:39 +0000 (+0000) Subject: rtlanal.c (get_initial_register_offset): Fall back to the estimate as long as the... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6138fed0bea4a1d7e25a272514edc7f75ed92285;p=gcc.git rtlanal.c (get_initial_register_offset): Fall back to the estimate as long as the epilogue isn't completed. * rtlanal.c (get_initial_register_offset): Fall back to the estimate as long as the epilogue isn't completed. From-SVN: r269013 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dba151b12ae..7c4dbd2d56c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-02-19 Eric Botcazou + + * rtlanal.c (get_initial_register_offset): Fall back to the estimate + as long as the epilogue isn't completed. + 2019-02-18 Martin Sebor * doc/cpp.texi (Conditional syntax): Add __has_attribute, diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 401c38fe0e2..345f13c6e99 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -359,10 +359,10 @@ get_initial_register_offset (int from, int to) if (to == from) return 0; - /* It is not safe to call INITIAL_ELIMINATION_OFFSET - before the reload pass. We need to give at least - an estimation for the resulting frame size. */ - if (! reload_completed) + /* It is not safe to call INITIAL_ELIMINATION_OFFSET before the epilogue + is completed, but we need to give at least an estimate for the stack + pointer based on the frame size. */ + if (!epilogue_completed) { offset1 = crtl->outgoing_args_size + get_frame_size (); #if !STACK_GROWS_DOWNWARD