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

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
This commit is contained in:
Andrew Pinski 2016-11-29 19:16:15 +00:00 committed by Andrew Pinski
parent 885cf7d356
commit 28ea3e977c
2 changed files with 6 additions and 1 deletions

View 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

View 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,