https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116840
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The other option is at isel time detect popcount & 1 and do similar tricks as popcount <=/== 1 and at expand see which cost is better. Though popcount rtx cost is wrong in the aarch64 backend.