https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90836
--- Comment #2 from Wilco <wilco at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > While it could be matched in match.pd variations would be quite a lot. > I don't see where else it fits (apart from forwprop which already does > fancy pattern matching...). > > You probably want to match generic INTEGER_CSTs and delay the actual > verification into a with {}. > > I suppose popcount on integers other than long long work with the same > pattern? There are lots of possible variations and given proving that a particular sequence is equivalent to popcount may be too difficult, it's about supporting the cases that occur in code that people care about.