tree-vrp.c (simplify_stmt_using_ranges): Use boolean_type_node for the EQ_EXPR.
authorAndrew Pinski <apinski@cavium.com>
Tue, 29 Nov 2016 19:16:15 +0000 (19:16 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 29 Nov 2016 19:16:15 +0000 (11:16 -0800)
2016-11-29  Andrew Pinski  <apinski@cavium.com>

        * tree-vrp.c (simplify_stmt_using_ranges): Use boolean_type_node
        for the EQ_EXPR.

From-SVN: r242970

gcc/ChangeLog
gcc/tree-vrp.c

index 16224c78659db85104d0b872bcee19bd45d2a68f..10660b74feb3ecacc47027d4fbf30d0a658adf92 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-29  Andrew Pinski  <apinski@cavium.com>
+
+       * tree-vrp.c (simplify_stmt_using_ranges): Use boolean_type_node
+       for the EQ_EXPR.
+
 2016-11-29  Chen Gang  <gang.chen.5i5j@gmail.com>
 
        PR target/71331
index f3d571d98b2898d6109182e836a601c25413ac60..600634d1804d37f3b307d0c1582db2ff83bb094e 100644 (file)
@@ -10225,7 +10225,7 @@ simplify_stmt_using_ranges (gimple_stmt_iterator *gsi)
             in divide by zero, new_rhs1 / new_rhs will be NULL_TREE.  */
          if (new_rhs1 && new_rhs2)
            {
-             tree cond = build2 (EQ_EXPR, TREE_TYPE (cmp_var), cmp_var, val1);
+             tree cond = build2 (EQ_EXPR, boolean_type_node, cmp_var, val1);
              gimple_assign_set_rhs_with_ops (gsi,
                                              COND_EXPR, cond,
                                              new_rhs1,