From e04de6674345fe4db57884b14e20accefc2ad795 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Tue, 26 Jul 2016 15:21:29 +0000 Subject: [PATCH] Minor changes in tree-vrp.c gcc/ChangeLog: * tree-vrp.c (dump_asserts_for): Print loc->expr instead of name. (extract_code_and_val_from_cond_with_ops): Verify that name is either cond_op0 or cond_op1. From-SVN: r238762 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vrp.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d853f3becc1..85cb6383e35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-07-26 Patrick Palka + + * tree-vrp.c (dump_asserts_for): Print loc->expr instead of + name. + (extract_code_and_val_from_cond_with_ops): Verify that name is + either cond_op0 or cond_op1. + 2016-07-26 Patrick Palka PR tree-optimization/18046 diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 69868272896..77c30144858 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -4828,7 +4828,7 @@ dump_asserts_for (FILE *file, tree name) dump_edge_info (file, loc->e, dump_flags, 0); } fprintf (file, "\n\tPREDICATE: "); - print_generic_expr (file, name, 0); + print_generic_expr (file, loc->expr, 0); fprintf (file, " %s ", get_tree_code_name (loc->comp_code)); print_generic_expr (file, loc->val, 0); fprintf (file, "\n\n"); @@ -5010,13 +5010,15 @@ extract_code_and_val_from_cond_with_ops (tree name, enum tree_code cond_code, comp_code = swap_tree_comparison (cond_code); val = cond_op0; } - else + else if (name == cond_op0) { /* The comparison is of the form NAME COMP VAL, so the comparison code remains unchanged. */ comp_code = cond_code; val = cond_op1; } + else + gcc_unreachable (); /* Invert the comparison code as necessary. */ if (invert) -- 2.30.2