https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86677
--- Comment #10 from Wilco <wilco at gcc dot gnu.org> --- (In reply to Martin Liška from comment #9) > Taking look at > ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c file: > > The __builtin_popcount is generated from: > > static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg) > { > ... > } else { > for (nchain = 0; rxchain; nchain++) > rxchain = rxchain & (rxchain - 1); > } > ... > } > > It started from r262486. I would that in this situation it's maybe > unexpected that a popcount call will be eventually generated. So I'm for an > option what will disable the pattern recognition. I'd say this is exactly a case where using a faster popcount instruction helps - if available of course. Is there any reason -fno-builtin-popcount can't also block automatic generation of popcount?