diff options
author | Richard Biener <rguenther@suse.de> | 2013-02-21 10:52:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-02-21 10:52:39 +0000 |
commit | 22deefcbb7c556a99fd72c1fb92a3a35b6dfd4b4 (patch) | |
tree | a542ffcdf642acb96c23172e970261d990845918 /gcc/tree-vrp.c | |
parent | 267499fa590aa35d0e7ad86ee74abf1387c25f63 (diff) | |
download | gcc-22deefcbb7c556a99fd72c1fb92a3a35b6dfd4b4.tar.gz |
re PR tree-optimization/56415 (Performance regression after fix for 56273)
2013-02-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/56415
Revert
2013-02-11 Richard Biener <rguenther@suse.de>
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
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 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)) |