https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89775

--- Comment #2 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Author: krebbel
Date: Wed Mar 20 15:28:38 2019
New Revision: 269823

URL: https://gcc.gnu.org/viewcvs?rev=269823&root=gcc&view=rev
Log:
S/390: Fix PR89775. Stackpointer save/restore instructions removed

Even if a global register is being clobbered in a function we usually
do not save and restore it. However, we still have to do this if it is
a special register. Most of the places in the backend handle this
correctly but not the prologue/epilogue optimization.

gcc/ChangeLog:

2019-03-20  Andreas Krebbel  <kreb...@linux.ibm.com>

        PR target/89775
        * config/s390/s390.c (global_not_special_regno_p): Move to make it
        available to ...
        (s390_optimize_register_info): Use global_not_special_regno_p to
        check for global regs.

2019-03-20  Jakub Jelinek  <ja...@redhat.com>

        PR target/89775
        * gcc.target/s390/pr89775-1.c: New test.
        * gcc.target/s390/pr89775-2.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/s390/pr89775-1.c
    trunk/gcc/testsuite/gcc.target/s390/pr89775-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/s390/s390.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to