]> gcc.gnu.org Git - gcc.git/commit
[PR107130] range-ops: Separate out ffs and popcount optimizations.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 3 Oct 2022 15:31:32 +0000 (17:31 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 4 Oct 2022 04:23:14 +0000 (06:23 +0200)
commitf50d103183c551c7f9f9f20efaf2ebbf83d5e99f
tree77e624677cb5b50d227f3697078e6d93f18a8dc1
parent70e3f71a279856eabf99bbc92c0345c3ad20b615
[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.
gcc/gimple-range-op.cc
gcc/testsuite/gcc.dg/tree-ssa/pr107130.c [new file with mode: 0644]
This page took 0.062967 seconds and 6 git commands to generate.