From 22deefcbb7c556a99fd72c1fb92a3a35b6dfd4b4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 21 Feb 2013 10:52:39 +0000 Subject: re PR tree-optimization/56415 (Performance regression after fix for 56273) 2013-02-21 Richard Biener PR tree-optimization/56415 Revert 2013-02-11 Richard Biener PR tree-optimization/56273 * tree-vrp.c (simplify_cond_using_ranges): Disable for the first VRP run. * g++.dg/warn/Warray-bounds-6.C: New testcase. * gcc.dg/tree-ssa/pr21559.c: Adjust. * gcc.dg/tree-ssa/vrp17.c: Likewise. * gcc.dg/tree-ssa/vrp18.c: Likewise. * gcc.dg/tree-ssa/vrp23.c: Likewise. * gcc.dg/tree-ssa/vrp24.c: Likewise. From-SVN: r196200 --- gcc/tree-vrp.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'gcc/tree-vrp.c') diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index a023a460371..a38b14d4956 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)) -- cgit v1.2.1