diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2016-03-30 16:30:57 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2016-03-30 14:30:57 +0000 |
commit | ba9c755f257ad36eaa7335c48008c76c27c0b30c (patch) | |
tree | 2c2462790bd07263fc7a94de1236e8fb1f73b78d /gcc/tree-ssa-loop-unswitch.c | |
parent | f6d2d066c26ebf0def0bd6d4be32c1d4801039fa (diff) | |
download | gcc-ba9c755f257ad36eaa7335c48008c76c27c0b30c.zip gcc-ba9c755f257ad36eaa7335c48008c76c27c0b30c.tar.gz gcc-ba9c755f257ad36eaa7335c48008c76c27c0b30c.tar.bz2 |
tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic estimates here.
* tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic
estimates here.
* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also
max_loop_iterations_int.
(tree_unswitch_outer_loop): Likewise.
* tree-ssa-loop-ivopts.c (avg_loop_niter): Likewise.
* tree-vect-loop.c (vect_analyze_loop_2): Likewise.
From-SVN: r234572
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r-- | gcc/tree-ssa-loop-unswitch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index dd6fd01..77acd66 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -223,6 +223,8 @@ tree_unswitch_single_loop (struct loop *loop, int num) /* If the loop is not expected to iterate, there is no need for unswitching. */ iterations = estimated_loop_iterations_int (loop); + if (iterations < 0) + iterations = max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS)) @@ -439,6 +441,8 @@ tree_unswitch_outer_loop (struct loop *loop) /* If the loop is not expected to iterate, there is no need for unswitching. */ iterations = estimated_loop_iterations_int (loop); + if (iterations < 0) + iterations = max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS)) |