This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, AArch64 v2 01/11] aarch64: Simplify LSE cas generation
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Richard Henderson <richard dot henderson at linaro dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, "agraf at suse dot de" <agraf at suse dot de>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, nd at arm dot com
- Date: Tue, 30 Oct 2018 19:48:46 +0000
- Subject: Re: [PATCH, AArch64 v2 01/11] aarch64: Simplify LSE cas generation
- References: <20181002161915.18843-1-richard.henderson@linaro.org> <20181002161915.18843-2-richard.henderson@linaro.org>
On Tue, Oct 02, 2018 at 11:19:05AM -0500, Richard Henderson wrote:
> The cas insn is a single insn, and if expanded properly need not
> be split after reload. Use the proper inputs for the insn.
OK.
Thanks,
James
>
> * 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.