Minor changes in tree-vrp.c
authorPatrick Palka <ppalka@gcc.gnu.org>
Tue, 26 Jul 2016 15:21:29 +0000 (15:21 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Tue, 26 Jul 2016 15:21:29 +0000 (15:21 +0000)
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
gcc/tree-vrp.c

index d853f3becc16c21f7b77288be7cb8c7fe33e5d48..85cb6383e3546520948e9869ec9d36de122d3055 100644 (file)
@@ -1,3 +1,10 @@
+2016-07-26  Patrick Palka  <ppalka@gcc.gnu.org>
+
+       * 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  <ppalka@gcc.gnu.org>
 
        PR tree-optimization/18046
index 69868272896a65a0d11535106463da3f5a245ddb..77c30144858b85f1d79a39a8046522613665cae3 100644 (file)
@@ -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)