On 8/13/2021 6:19 PM, apinski--- via Gcc-patches wrote:
From: Andrew Pinski <apin...@marvell.com> While working on some more boolean optimizations, I noticed that there are places which does SSA_NAME@0 and then look at then either use get_nonzero_bits or ssa_name_has_boolean_range to see if the ssa name had a boolean range. This cleans this up slightly by have a simple match pattern call gimple_truth_valued_p which matches on SSA_NAME and checks ssa_name_has_boolean_range. This is the first of the few cleanups I am going to do for match and simplify and boolean related changes. gcc/ChangeLog: * match.pd: New match, gimple_truth_valued_p. Use it for "{ 0 or 1 } * { 0 or 1 }", "X / bool_range_Y", and "-(type)!A" simplifcations.
OK jeff