diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-01 12:01:17 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-01 12:01:17 +0000 |
commit | 53b01069945a5c1dd8ecb1a34d3f73ad86965112 (patch) | |
tree | ae7e412f842bbcac3d8dcd2c7ef4fe40679efea6 /gcc/loop-unroll.c | |
parent | 9c9a6c2515033aabbba5a037674573526ab37319 (diff) | |
download | gcc-53b01069945a5c1dd8ecb1a34d3f73ad86965112.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r-- | gcc/loop-unroll.c | 6 |
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) |