On 9/2/23 09:09, Andrew Pinski via Gcc-patches wrote:
Right now ssa_name_has_boolean_range compares the range to
range_true_and_false but instead we would get the nonzero bits and
compare that to 1 instead (<=u 1).
The nonzerobits comparison can be done in similar fashion.
Note I think get_nonzero_bits is redundant as the range queury will
return a more accurate version or the same value.

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

gcc/ChangeLog:

        * tree-ssanames.cc (ssa_name_has_boolean_range): Improve
        using range's get_nonzero_bits and use `<=u 1`.
OK
jeff

Reply via email to