[Bug target/49244] __sync or __atomic builtins will not emit 'lock bts/btr/btc'
dhowells at redhat dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 28 10:16:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49244
--- Comment #7 from dhowells at redhat dot com <dhowells at redhat dot com> ---
We should also be able to reduce:
bool
test_bit (int *a, int bit)
{
uint mask = (1u << bit);
return (__atomic_load_n (a, __ATOMIC_xxx) & mask) != 0;
}
to a BT instruction on x86.
More information about the Gcc-bugs
mailing list