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

--- Comment #4 from Ruslan <b7.10110111 at gmail dot com> ---
(In reply to Jakub Jelinek from comment #3)
> ...
> nothing there is able to optimize & -1 (and similarly | or ^ 0, or & 0, or |
> -1).

Just a note: the same happens for arithmetic operations, not just bitwise. E.g.
if you change `v&=~(1ull<<63)` in the OP to `v+=1ull<<32`, GCC generates `add
dword [esp],0` followed by `adc dword [esp+4],1`.

Reply via email to