https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693

Piotr Siupa <piotrsiupa at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |piotrsiupa at gmail dot com

--- Comment #8 from Piotr Siupa <piotrsiupa at gmail dot com> ---
I did a benchmark and (x & (x-1)) == 0 and it seems to be about 2x as fast as
the currently generated code (at least on my AMD64 processor).

Maybe it should be used if x is guaranteed to not be zero, e.g. if (x == 0)
std::unreachable().

Reply via email to