[PATCH 2/3] MATCH: Improve zero_one_valued_p by using ssa_name_has_boolean_range

Jeff Law jeffreyalaw@gmail.com
Tue Sep 5 06:59:16 GMT 2023



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


More information about the Gcc-patches mailing list