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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-04-16
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

>+/* popcount (X ^ (X - 1)) - 1 is CTZ (X) when X is nonzero.  */

Most likely it is better to do:
popcount (X ^ (X - 1)) -> CTZ (X) + 1

And allow the `+ 1 - 1` cancel each other out. Plus Someone might just write
the popcount without the -1 on the end.

Reply via email to