https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107676
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't think __atomic_compare_exchange emits such a loop. This is about __atomic_fetch_xor and friends, which do emit cmpxchg loops. But there are four such functions to name.