https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95771
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- 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.