aboutsummaryrefslogtreecommitdiff
path: root/gcc/vr-values.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2021-10-26 13:19:05 -0400
committerAndrew MacLeod <amacleod@redhat.com>2021-10-28 10:48:39 -0400
commita6bbf1cc9f2847115543d720a99152d7dc2c4892 (patch)
treed989e1d3eeebed718912c94028d6d7ec819e9099 /gcc/vr-values.c
parentd46aeb5906b8ed7ee255cfbacc5cf9d2f56b850c (diff)
downloadgcc-a6bbf1cc9f2847115543d720a99152d7dc2c4892.zip
gcc-a6bbf1cc9f2847115543d720a99152d7dc2c4892.tar.gz
gcc-a6bbf1cc9f2847115543d720a99152d7dc2c4892.tar.bz2
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.
Diffstat (limited to 'gcc/vr-values.c')
-rw-r--r--gcc/vr-values.c14
1 files changed, 10 insertions, 4 deletions
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);