https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693
Bug ID: 90693 Summary: Missing popcount simplifications Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: wilco at gcc dot gnu.org Target Milestone: --- While GCC optimizes __builtin_popcount (x) != 0 into x != 0, we can also optimize __builtin_popcount (x) == 1 into x == (x & -x), and __builtin_popcount (x) > 1 into (x & (x-1)) != 0.