On 9/2/23 09:09, Andrew Pinski via Gcc-patches wrote:
Currently zero_one_valued_p uses tree_nonzero_bits which uses
the global ranges of the SSA Names. We can improve this via using
ssa_name_has_boolean_range which uses the local ranges
which are used while handling folding during VRP and other passes.

OK? Bootstrapped and tested on x86_64 with no regressions.

gcc/ChangeLog:

        * match.pd (zero_one_valued_p): Match SSA_NAMES where
        ssa_name_has_boolean_range returns true.
OK. Presumably we're confident using a context sensitive range is always OK in here.

Jeff

Reply via email to