https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86677
--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Wilco from comment #10) > (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. Yes, but as seen in PR87528, using a libgcc can slow down a SPEC benchmark. But it's related to generic tuning. > > Is there any reason -fno-builtin-popcount can't also block automatic > generation of popcount? Do we really have such option?