https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95771
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|jakub at gcc dot gnu.org |pinskia at gcc dot
gnu.org
CC| |pinskia at gcc dot gnu.org
--- Comment #4 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Should be fixed now, except that for __uint128_t we aren't able to optimize
> away the conditional in if (x) return __builtin_popcountll (x >> 64) +
> __builtin_popcountll (x); else return 0; - the phiopt popcount/clz/ctz
> conditional removal isn't able to deal with the two popcounts added + shift
> and cast.
So mine but most likely for GCC 18.
Note for aarch64, we do get the correct thing of only the popcount but that is
because there is a popcountTI .