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.