On 11/1/23 12:00, Jeff Law wrote:
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
Committed.
I think I'll leave it as-is since IMO sync.md is more readable when
those statements are broken up.
If someone finds issue with it in the future we can easily apply the
diff from the patch.
Thanks,
Patrick