From a6bbf1cc9f2847115543d720a99152d7dc2c4892 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 26 Oct 2021 13:19:05 -0400 Subject: Unify EVRP and VRP folding predicate message. EVRP issues a message fior folding predicates in a different format than VRP does, this patch unifies the messaging. gcc/ * vr-values.c (simplify_using_ranges::fold_cond): Change fold message. gcc/testsuite/ * gcc.dg/tree-ssa/evrp9.c: Adjust message scanned for. * gcc.dg/tree-ssa/pr21458-2.c: Ditto. --- gcc/vr-values.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gcc/vr-values.c') diff --git a/gcc/vr-values.c b/gcc/vr-values.c index 00246c9..ea925f7 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -3495,12 +3495,18 @@ simplify_using_ranges::fold_cond (gcond *cond) if (TREE_CODE (gimple_cond_lhs (cond)) != SSA_NAME && TREE_CODE (gimple_cond_rhs (cond)) != SSA_NAME) return false; + if (dump_file) + { + fprintf (dump_file, "Folding predicate "); + print_gimple_expr (dump_file, cond, 0); + fprintf (dump_file, " to "); + } edge e0 = EDGE_SUCC (gimple_bb (cond), 0); edge e1 = EDGE_SUCC (gimple_bb (cond), 1); if (r.zero_p ()) { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "\nPredicate evaluates to: 0\n"); + if (dump_file) + fprintf (dump_file, "0\n"); gimple_cond_make_false (cond); if (e0->flags & EDGE_TRUE_VALUE) set_and_propagate_unexecutable (e0); @@ -3509,8 +3515,8 @@ simplify_using_ranges::fold_cond (gcond *cond) } else { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "\nPredicate evaluates to: 1\n"); + if (dump_file) + fprintf (dump_file, "1\n"); gimple_cond_make_true (cond); if (e0->flags & EDGE_FALSE_VALUE) set_and_propagate_unexecutable (e0); -- cgit v1.1