diff options
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index a023a46..a38b14d 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -8503,8 +8503,9 @@ test_for_singularity (enum tree_code cond_code, tree op0, return NULL; } -/* Simplify the conditional stmt STMT using final range information. - Return true if we simplified the statement. */ +/* Simplify a conditional using a relational operator to an equality + test if the range information indicates only one value can satisfy + the original conditional. */ static bool simplify_cond_using_ranges (gimple stmt) @@ -8513,13 +8514,7 @@ simplify_cond_using_ranges (gimple stmt) tree op1 = gimple_cond_rhs (stmt); enum tree_code cond_code = gimple_cond_code (stmt); - /* Simplify a conditional using a relational operator to an equality - test if the range information indicates only one value can satisfy - the original conditional. - Do that only in the second VRP pass as otherwise assertions derived - from this predicate are weakened. */ - if (!first_pass_instance - && cond_code != NE_EXPR + if (cond_code != NE_EXPR && cond_code != EQ_EXPR && TREE_CODE (op0) == SSA_NAME && INTEGRAL_TYPE_P (TREE_TYPE (op0)) |