https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107130
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aldy Hernandez <al...@gcc.gnu.org>: https://gcc.gnu.org/g:f50d103183c551c7f9f9f20efaf2ebbf83d5e99f commit r13-3052-gf50d103183c551c7f9f9f20efaf2ebbf83d5e99f Author: Aldy Hernandez <al...@redhat.com> Date: Mon Oct 3 17:31:32 2022 +0200 [PR107130] range-ops: Separate out ffs and popcount optimizations. __builtin_popcount and __builtin_ffs were sharing the same range-ops entry, but the nonzero mask optimization is not valid for ffs. Separate them out into two entries. PR tree-optimization/107130 gcc/ChangeLog: * gimple-range-op.cc (class cfn_popcount): Call op_cfn_ffs. (class cfn_ffs): New. (gimple_range_op_handler::maybe_builtin_call): Separate out CASE_CFN_FFS into its own case. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr107130.c: New test.