On Tue, 23 Oct 2018, Richard Biener wrote: > On Tue, 23 Oct 2018, Aldy Hernandez wrote: > > > > > > + if (tem.kind () == old_vr->kind () > > > + && tem.min () == old_vr->min () > > > + && tem.max () == old_vr->max ()) > > > + continue; > > > > I think it would be cleaner to use tem.ignore_equivs_equal_p (*old_vr). The > > goal was to use == when the equivalence bitmap should be taken into account, > > or ignore_equivs_equal_p() otherwise. > > Ah, didn't know of that function (and yes, I wanted to ignore equivs). > > Will try to remember together with the dump thing David noticed.
Like the following. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-10-23 Richard Biener <rguent...@suse.de> * tree-vrp.c (add_assert_info): Guard dump_printf with dump_enabled_p. * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::record_ranges_from_incoming_edge): Use value_range::ignore_equivs_equal_p. Index: gcc/tree-vrp.c =================================================================== --- gcc/tree-vrp.c (revision 265420) +++ gcc/tree-vrp.c (working copy) @@ -2299,9 +2299,10 @@ add_assert_info (vec<assert_info> &asser info.val = val; info.expr = expr; asserts.safe_push (info); - dump_printf (MSG_NOTE | MSG_PRIORITY_INTERNALS, - "Adding assert for %T from %T %s %T\n", - name, expr, op_symbol_code (comp_code), val); + if (dump_enabled_p ()) + dump_printf (MSG_NOTE | MSG_PRIORITY_INTERNALS, + "Adding assert for %T from %T %s %T\n", + name, expr, op_symbol_code (comp_code), val); } /* If NAME doesn't have an ASSERT_EXPR registered for asserting Index: gcc/gimple-ssa-evrp-analyze.c =================================================================== --- gcc/gimple-ssa-evrp-analyze.c (revision 265420) +++ gcc/gimple-ssa-evrp-analyze.c (working copy) @@ -209,9 +209,7 @@ evrp_range_analyzer::record_ranges_from_ value_range *old_vr = get_value_range (vrs[i].first); value_range tem (old_vr->kind (), old_vr->min (), old_vr->max ()); tem.intersect (vrs[i].second); - if (tem.kind () == old_vr->kind () - && tem.min () == old_vr->min () - && tem.max () == old_vr->max ()) + if (tem.ignore_equivs_equal_p (*old_vr)) continue; push_value_range (vrs[i].first, vrs[i].second); if (is_fallthru