aarch64: Improve swp generation
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 31 Oct 2018 09:47:21 +0000 (09:47 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 31 Oct 2018 09:47:21 +0000 (02:47 -0700)
commit8f5603d363a4e0453d2c38c7103aeb0bdca85c4e
treecb57a520915c778e37eee388922ed32ccd964711
parent260eedb901c1b3df69598a724e23e33674ab654b
aarch64: Improve swp generation

Allow zero as an input; fix constraints; avoid unnecessary split.

* config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
(aarch64_gen_atomic_ldop): Don't call it.
* config/aarch64/atomics.md (atomic_exchange<ALLI>):
Use aarch64_reg_or_zero.
(aarch64_atomic_exchange<ALLI>): Likewise.
(aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
operand 0; use aarch64_reg_or_zero for input; merge ...
(@aarch64_atomic_swp<ALLI>): ... this and remove.

From-SVN: r265659
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/atomics.md