[Bug target/103069] cmpxchg isn't optimized
thiago at kde dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 23 04:06:52 GMT 2022
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.
More information about the Gcc-bugs
mailing list