]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Simplify LSE cas generation
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 31 Oct 2018 09:29:29 +0000 (09:29 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 31 Oct 2018 09:29:29 +0000 (02:29 -0700)
commit77f33f44baf24c22848197aa80962c003dd7b3e2
treea1fc76d6ee8e85ab16d6ba4a95070461a6e27c8f
parent187cea947e54d08eaed2587edeb49a5cc1fe8d6a
aarch64: Simplify LSE cas generation

The cas insn is a single insn, and if expanded properly need not
be split after reload.  Use the proper inputs for the insn.

* config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
Force oldval into the rval register for TARGET_LSE; emit the compare
during initial expansion so that it may be deleted if unused.
(aarch64_gen_atomic_cas): Remove.
* config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
Change =&r to +r for operand 0; use match_dup for operand 2;
remove is_weak and mod_f operands as unused.  Drop the split
and merge with...
(@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
(@aarch64_compare_and_swap<GPI>_lse): Similarly.
(@aarch64_atomic_cas<GPI>): Similarly.

From-SVN: r265656
gcc/ChangeLog
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/atomics.md