[Bug target/103066] __sync_val_compare_and_swap/__sync_bool_compare_and_swap aren't optimized
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 5 12:17:00 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103066
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If by fail you mean that it doesn't update the memory if the memory isn't equal
to expected, sure, but do you mean it can fail spuriously, not update the
memory even if the memory is equal to expected?
Neither __sync_{bool,val}_compare_and_swap nor __atomic_compare_exchange_n with
weak set to false can fail spuriously, __atomic_compare_exchange_n with weak
set to true can.
More information about the Gcc-bugs
mailing list