https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97770
--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Richard Biener from comment #4) > What's missing is middle-end folding support to narrow popcount to the > appropriate internal function call with byte/half-word width when target > support > is available. But I'm quite sure there's no scalar popcount instruction > operating on half-word or byte pieces of a GPR? x86 has popcnt that operates on 16bit register. https://www.felixcloutier.com/x86/popcnt