diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-18 19:47:16 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-18 19:47:16 +0000 |
commit | 4f87bd68d2e70bb06e350c16b9ada67c24075380 (patch) | |
tree | d39d6d56ed7796b26c42b4c0d68518a4491b59a3 /gcc/tree-ssa-propagate.c | |
parent | 1e8e992020adfba209ef30b3c369e2ca6282d837 (diff) | |
download | gcc-4f87bd68d2e70bb06e350c16b9ada67c24075380.tar.gz |
* tree-vrp.c (test_for_singularity): Correct test for new
min limit. Use operand_equal_p rather than pointer equality
for testing if new min/max values are equal.
* tree-ssa-propagate.c (substitute_and_fold): Delay simplifications
using range information until after propagation and folding.
* gcc.c-torture/execute/930529-1.x: Use -fwrapv as test depends
on wrapping on overflow semantics.
* gcc.dg/tree-ssa/pr23109.c: Remove the .lim file too.
* gcc.gc/tree-ssa/vrp23.c: New test.
* gcc.gc/tree-ssa/vrp24.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index d8ba253b9d5..dcdc6add4dd 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -1,5 +1,5 @@ /* Generic SSA value propagation engine. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@redhat.com> This file is part of GCC. @@ -1124,14 +1124,7 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p) /* If we have range information, see if we can fold predicate expressions. */ if (use_ranges_p) - { - did_replace = fold_predicate_in (stmt); - - /* Some statements may be simplified using ranges. For - example, division may be replaced by shifts, modulo - replaced with bitwise and, etc. */ - simplify_stmt_using_ranges (stmt); - } + did_replace = fold_predicate_in (stmt); if (prop_value) { @@ -1178,6 +1171,16 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p) fprintf (dump_file, "\n"); } } + + /* Some statements may be simplified using ranges. For + example, division may be replaced by shifts, modulo + replaced with bitwise and, etc. Do this after + substituting constants, folding, etc so that we're + presented with a fully propagated, canonicalized + statement. */ + if (use_ranges_p) + simplify_stmt_using_ranges (stmt); + } } |