summaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-06-01 14:01:17 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2016-06-01 12:01:17 +0000
commit8c38360082278de6400ac277e15f75edecc8eb39 (patch)
treeae7e412f842bbcac3d8dcd2c7ef4fe40679efea6 /gcc/loop-unroll.c
parent268143a480cf8e4142db3ebb2dadaf924f6f3303 (diff)
loop-unroll.c (decide_unroll_constant_iterations, [...]): Use likely upper bounds.
* loop-unroll.c (decide_unroll_constant_iterations, decide_unroll_runtime_iterations, decide_unroll_stupid): Use likely upper bounds. * loop-iv.c (find_simple_exit): Dump likely upper bounds. * gcc.dg/unroll-6.c: Update template. * gcc.dg/unroll-7.c: New testcase. * gcc.dg/unroll-8.c: New testcase. From-SVN: r236986
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 97735a89e58..42b1548d1ff 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -396,7 +396,7 @@ decide_unroll_constant_iterations (struct loop *loop, int flags)
of iterations. */
if (desc->niter < 2 * nunroll
|| ((get_estimated_loop_iterations (loop, &iterations)
- || get_max_loop_iterations (loop, &iterations))
+ || get_likely_max_loop_iterations (loop, &iterations))
&& wi::ltu_p (iterations, 2 * nunroll)))
{
if (dump_file)
@@ -706,7 +706,7 @@ decide_unroll_runtime_iterations (struct loop *loop, int flags)
/* Check whether the loop rolls. */
if ((get_estimated_loop_iterations (loop, &iterations)
- || get_max_loop_iterations (loop, &iterations))
+ || get_likely_max_loop_iterations (loop, &iterations))
&& wi::ltu_p (iterations, 2 * nunroll))
{
if (dump_file)
@@ -1162,7 +1162,7 @@ decide_unroll_stupid (struct loop *loop, int flags)
/* Check whether the loop rolls. */
if ((get_estimated_loop_iterations (loop, &iterations)
- || get_max_loop_iterations (loop, &iterations))
+ || get_likely_max_loop_iterations (loop, &iterations))
&& wi::ltu_p (iterations, 2 * nunroll))
{
if (dump_file)