On 11/1/23 10:14, Patrick O'Neill wrote:
Other subword atomic patterns use riscv_subword_address to calculate
the aligned address, shift amount, mask and !mask. atomic_test_and_set
was implemented before the common function was added. After this patch
all subword atomic patterns use riscv_subword_address.
gcc/ChangeLog:
* config/riscv/sync.md: Use riscv_subword_address function to
calculate the address and shift in atomic_test_and_set.
OK. No strong opinions on the extraneous move at -O0. It does make a
tiny bit of work for the optimizers, but I doubt it matters in practice.
Your call if you want to fix that as a follow-up or not.
jeff