On 6/6/23 18:17, Andrew Pinski via Gcc-patches wrote:
While working on `bool0 ? bool1 : bool2` I noticed that
zero_one_valued_p does not match on the constant zero
as in that case tree_nonzero_bits will return 0 and
that is different from 1.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

        * match.pd (zero_one_valued_p): Match 0 integer constant
        too.
Presumably "1" is matched by the tree_nonzero_bits (@0) == 1.  So OK.

jeff

Reply via email to