aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-03-28 12:20:09 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-03-28 12:20:09 +0000
commit2ab8dbf48ee7c2eba910ee25ee37afd40e259738 (patch)
tree7e98fd147828149c3866ab6ab9ae3e7ddbd75173 /gcc/tree.def
parentb0be8e5c63c8c89cf57b42566306c22b6654fda8 (diff)
downloadgcc-2ab8dbf48ee7c2eba910ee25ee37afd40e259738.zip
gcc-2ab8dbf48ee7c2eba910ee25ee37afd40e259738.tar.gz
gcc-2ab8dbf48ee7c2eba910ee25ee37afd40e259738.tar.bz2
re PR tree-optimization/30317 (VRP cannot extract a range from (unsigned int) i + 0x0ffffffff > 4)
2008-03-28 Richard Guenther <rguenther@suse.de> PR tree-optimization/30317 PR tree-optimization/30911 PR tree-optimization/34793 * tree-vrp.c (set_and_canonicalize_value_range): New function. (struct assert_locus_d): New member EXPR. (register_new_assert_for): Add EXPR parameter to support ASSERT_EXPR <name, expr OP limit>. (register_edge_assert_for_1): Adjust callers. (find_assert_locations): Likewise. (process_assert_insertions_for): Build condition from expression. (extract_range_from_assert): Handle ASSERT_EXPRs of the form ASSERT_EXPR <name, expr OP limit>. (register_edge_assert_for_2): New helper registering asserts for comparisons. Recognize range tests of the form (unsigned)i - CST1 OP CST2. (register_edge_assert_for_1): Use it. (register_edge_assert_for): Likewise. * tree.def (ASSERT_EXPR): Document extra allowed conditional expressions. (needs_overflow_infinity): Integer sub-types do not need overflow infinities. (vrp_val_is_max): The extreme values of integer sub-types are those of the base type. (vrp_val_is_min): Likewise. * gcc.dg/tree-ssa/vrp35.c: New testcase. * gcc.dg/tree-ssa/vrp36.c: Likewise. * gcc.dg/tree-ssa/vrp37.c: Likewise. From-SVN: r133680
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index 89c18df..70b5c65 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -937,8 +937,13 @@ DEFTREECODE (VALUE_HANDLE, "value_handle", tcc_exceptional, 0)
two things:
1- X is a copy of Y.
- 2- EXPR is a GIMPLE conditional expression (as defined by
- is_gimple_condexpr) and is known to be true.
+ 2- EXPR is a conditional expression and is known to be true.
+
+ Valid and to be expected forms of conditional expressions are
+ valid GIMPLE condidional expressions (as defined by is_gimple_condexpr)
+ and conditional expressions with the first operand being a
+ PLUS_EXPR with a variable possibly wrapped in a NOP_EXPR first
+ operand and an integer constant second operand.
The type of the expression is the same as Y. */
DEFTREECODE (ASSERT_EXPR, "assert_expr", tcc_expression, 2)