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

Daniel Henrique Barboza <daniel.barboza at oss dot qualcomm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.barboza at oss dot 
qualcomm
                   |                            |.com

--- Comment #5 from Daniel Henrique Barboza <daniel.barboza at oss dot 
qualcomm.com> ---
Hi,

Just sent a fix proposal to the ML:

https://gcc.gnu.org/pipermail/gcc-patches/2026-February/708492.html


My idea is to use phiopt to assess whether we're dealing with the cases
mentioned here:

- if someone checks if a bit/bitmask is not enabled, and if true enable it ->
just enable the bit/bitmask;

- if someone checks if a bit/bitmask is enabled, and if true disable it -> just
enable the bit/bitmask.


The end result is that the gcond is eliminated and, if the bitmask comparison
isn't used anywhere else, the bit_and operation also goes away.

Reply via email to