S/390: Fix PR81534
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Thu, 27 Jul 2017 10:39:49 +0000 (10:39 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Thu, 27 Jul 2017 10:39:49 +0000 (10:39 +0000)
commit58814c7630eccb63cd24d198cfda2e8a268faa7e
tree25587c3387f02df01178775dce8b6c0e0db97355
parent02d3ba0e000ad83dcb76ccccd1ea9882672d71b1
S/390: Fix PR81534

The HI/QI atomic_fetch_<atomic><mode>" expander accepted symbolic
references and emitted CAS patterns whose insn predicates rejected them.

Fixed by allowing symbolic references there as well.  Reload will get
rid of them due to the constraint letter.

Regression tested on s390x.

gcc/ChangeLog:

2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

PR target/81534
* config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
Change s_operand to memory_operand.

gcc/testsuite/ChangeLog:

2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

PR target/81534
* gcc.target/s390/pr81534.c: New test.

From-SVN: r250617
gcc/ChangeLog
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/pr81534.c [new file with mode: 0644]