]> gcc.gnu.org Git - gcc.git/commit
match.pd: Improve zero_one_valued_p
authorJakub Jelinek <jakub@redhat.com>
Wed, 7 Jun 2023 17:18:26 +0000 (19:18 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 7 Jun 2023 17:18:26 +0000 (19:18 +0200)
commite2ebd22acac844ba74e69a34dbf064d41d102cc1
tree3ded2616ac90961ff16ab26762401425e871d504
parent9963029a24f2d2510b82e7106fae3f364da33c5d
match.pd: Improve zero_one_valued_p

Recently zero_one_valued_p was changed to handle integer_zerop
case specially, because tree_nonzero_bits (@0) == 1 only returns
true for non-constant values with range [0, 1] or constant 1,
constant 0 has tree_nonzero_bits (integer_zero_node) == 0.

The following patch reverts that change and instead checks
that tree_nonzero_bits is <= 1U.

2023-06-07  Jakub Jelinek  <jakub@redhat.com>

* match.pd (zero_one_valued_p): Don't handle integer_zerop specially,
instead compare tree_nonzero_bits <= 1U rather than just == 1.
gcc/match.pd
This page took 0.191291 seconds and 5 git commands to generate.