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

--- Comment #14 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Author: krebbel
Date: Thu Sep  6 07:38:42 2018
New Revision: 264143

URL: https://gcc.gnu.org/viewcvs?rev=264143&root=gcc&view=rev
Log:
S/390: Prohibit SYMBOL_REF in UNSPECV_CAS

Inhibit constant propagation inlining SYMBOL_REF loads into
UNSPECV_CAS.  Even though reload can later undo it, the resulting
code will be less efficient.

gcc/ChangeLog:

2018-09-06  Ilya Leoshkevich  <i...@linux.ibm.com>

        PR target/80080
        * config/s390/predicates.md: Add nonsym_memory_operand.
        * config/s390/s390.c (s390_legitimize_cs_operand): If operand
        contains a SYMBOL_REF, load it into an intermediate pseudo.
        (s390_emit_compare_and_swap): Legitimize operand.
        * config/s390/s390.md: Use the new nonsym_memory_operand
        with UNSPECV_CAS patterns.

gcc/testsuite/ChangeLog:

2018-09-06  Ilya Leoshkevich  <i...@linux.ibm.com>

        PR target/80080
        * gcc.target/s390/pr80080-3.c: New test.
        * gcc.target/s390/s390.exp: Make sure the new test passes
        on all optimization levels.



Added:
    trunk/gcc/testsuite/gcc.target/s390/pr80080-3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/s390/predicates.md
    trunk/gcc/config/s390/s390.c
    trunk/gcc/config/s390/s390.md
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/s390/s390.exp

Reply via email to