https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- It does do that (if there's a POPCOUNT optab, that is). Replacing with __builtin_popcount would eventually lead to an infinite recursion in this case ;) (see that old memcpy + ldist bug)