On 9/2/23 09:09, Andrew Pinski via Gcc-patches wrote:
This replaces all uses of ssa_name_has_boolean_range with zero_one_valued_p
except for the one in the definition of zero_one_valued_p. This simplifies
the code in general and makes only one way of saying we have a range of [0,1].

Note this depends on the patch that adds ssa_name_has_boolean_range usage
to zero_one_valued_p.

OK? Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

        * match.pd: Move zero_one_valued_p and truth_valued_p
        towards the begnining of the file.
        (X / bool_range_Y): Use zero_one_valued_p instead
        of ssa_name_has_boolean_range. Move after all other
        `X / Y` patterns. Add check to make sure bool_range_Y
        is not the literal 0.
        (1 - a): Use zero_one_valued_p instead
        of ssa_name_has_boolean_range
        (-(type)!A): Likewise.
OK.
jeff

Reply via email to