diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-07 05:40:49 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-07 05:40:49 +0000 |
commit | 96c8d283ee08bf43490b3dcd4e084facaecc1994 (patch) | |
tree | 39d0d67d3b7776dd952fdc17b8a92c3b380e47cb /gcc/tree-ssa-propagate.c | |
parent | e744e148673e3c3b554ecf12dff523cdefb9daf4 (diff) | |
download | gcc-96c8d283ee08bf43490b3dcd4e084facaecc1994.tar.gz |
* tree-vrp.c (simplify_using_ranges): Kill.
(vrp_finalize): Remove call to simplify_using_ranges.
(simplify_stmt_using_ranges): New function extracted from
simplify_using_ranges.
(simplify_div_or_mod_using_ranges): Likewise.
(simplify_abs_using_ranges): Likewise.
(simplify_cond_using_ranges): New function.
* tree-flow.h (simplify_stmt_using_ranges): Prototype.
* tree-ssa-propagate.c (substitute_and_fold): Call
simplify_stmt_using_ranges if we have range information.
* gcc.dg/tree-ssa/vrp17.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101685 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index ce73ae3a490..b9b308e6078 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -1108,7 +1108,14 @@ 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); + { + 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); + } if (prop_value) { |