https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103069
--- Comment #20 from Thiago Macieira <thiago at kde dot org> --- I think there will be cases where the relaxation makes sense and others where it doesn't because the surrounding code already does it. So I'd like to control per emission. If I can't do it per code block, I suppose I could make a lambda block [&]() __attribute__((target("relax-cmpxchg-loop"))) { return __atomic_compare_exchange_weak(....); }(); Of course, it might be easier to simply relax it myself at that point.