diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-21 09:15:38 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-21 09:15:38 +0000 |
| commit | 19a8301a96cbab1046766864f4e527906f3fe846 (patch) | |
| tree | a18f595d229483f0389d11db182f5bc51f0b308d | |
| parent | 48a9035a3bb8cb2ddb21306e5877b47898cb25d8 (diff) | |
| download | ppe42-gcc-19a8301a96cbab1046766864f4e527906f3fe846.tar.gz ppe42-gcc-19a8301a96cbab1046766864f4e527906f3fe846.zip | |
2013-11-21 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-ch.c (copy_loop_headers): Decrement
nb_iterations_upper_bound by one.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205198 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/tree-ssa-loop-ch.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1cfbefef29d..1ececafc827 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2013-11-21 Richard Biener <rguenther@suse.de> + * tree-ssa-loop-ch.c (copy_loop_headers): Decrement + nb_iterations_upper_bound by one. + +2013-11-21 Richard Biener <rguenther@suse.de> + PR tree-optimization/59058 * tree-loop-distribution.c (struct partition_s): Add plus_one member. diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c index df45c286790..ccaa9c8987e 100644 --- a/gcc/tree-ssa-loop-ch.c +++ b/gcc/tree-ssa-loop-ch.c @@ -243,6 +243,16 @@ copy_loop_headers (void) are not now, since there was the loop exit condition. */ split_edge (loop_preheader_edge (loop)); split_edge (loop_latch_edge (loop)); + + /* We peeled off one iteration of the loop thus we can lower + the maximum number of iterations if we have a previously + recorded value for that. */ + double_int max; + if (get_max_loop_iterations (loop, &max)) + { + max -= double_int_one; + loop->nb_iterations_upper_bound = max; + } } update_ssa (TODO_update_ssa); |

