diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-11-20 10:03:20 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-11-20 10:03:20 +0100 |
commit | 103a3966bc7b68f91b6cd3c5beb330c4b8570c90 (patch) | |
tree | 5f926122f5850a4bc55de2a1efa2c50548735a10 /gcc/tree-vect-loop.cc | |
parent | d0b6b7f8a6b8115b033441590a6304fb088d193c (diff) | |
download | gcc-103a3966bc7b68f91b6cd3c5beb330c4b8570c90.zip gcc-103a3966bc7b68f91b6cd3c5beb330c4b8570c90.tar.gz gcc-103a3966bc7b68f91b6cd3c5beb330c4b8570c90.tar.bz2 |
tree-ssa-math-opts: popcount (X) == 1 to (X ^ (X - 1)) > (X - 1) optimization for direct optab [PR90693]
On Fri, Nov 17, 2023 at 03:01:04PM +0100, Jakub Jelinek wrote:
> As a follow-up, I'm considering changing in this routine the popcount
> call to IFN_POPCOUNT with 2 arguments and during expansion test costs.
Here is the follow-up which does the rtx costs testing.
2023-11-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/90693
* tree-ssa-math-opts.cc (match_single_bit_test): Mark POPCOUNT with
result only used in equality comparison against 1 with direct optab
support as .POPCOUNT call with 2 arguments.
* internal-fn.h (expand_POPCOUNT): Declare.
* internal-fn.def (DEF_INTERNAL_INT_EXT_FN): New macro, document it,
undefine at the end.
(POPCOUNT): Use it instead of DEF_INTERNAL_INT_FN.
* internal-fn.cc (DEF_INTERNAL_INT_EXT_FN): Define to nothing before
inclusion to define expanders.
(expand_POPCOUNT): New function.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions