[AArch64] Allow const0_rtx operand for atomic compare-exchange patterns
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 6 Jun 2017 13:26:46 +0000 (13:26 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 6 Jun 2017 13:26:46 +0000 (13:26 +0000)
commit4ebcc903bf03705099cd4b50231dc8fe444d70b9
treec27196f3a87512de1b23e07932cf97bc567d0b4e
parent9bd01837e4c9f8f4e005a95a59f0147a6bb1d7c7
[AArch64] Allow const0_rtx operand for atomic compare-exchange patterns

* config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
Use aarch64_reg_or_zero predicate for operand 4.
(aarch64_compare_and_swap<mode> define_insn_and_split):
Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
(aarch64_store_exclusive<mode>): Likewise for operand 2.

* gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c: New test.

From-SVN: r248921
gcc/ChangeLog
gcc/config/aarch64/atomics.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c [new file with mode: 0644]