summaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-06 20:24:00 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-06 20:24:00 +0000
commitf30c7901475fdf64ecad7067572e09e1b561f032 (patch)
treed915060a51b36c45e01302a15b2e5cc3e27f761c /gcc/loop-unroll.c
parent498bac87612f93dcfc25f257a394477639b9247c (diff)
downloadgcc-f30c7901475fdf64ecad7067572e09e1b561f032.tar.gz
PR rtl-optimization/21254
* loop-iv.c (iv_number_of_iterations): Simplify infiniteness assumptions for loops that otherwise do not roll. (find_simple_exit): Prefer # of iterations that is guaranteed not to be infinite. * loop-unroll.c (decide_peel_once_rolling, decide_peel_completely): Check whether the loop is infinite. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 409df0caa6e..68512d02a5a 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -375,6 +375,7 @@ decide_peel_once_rolling (struct loop *loop, int flags ATTRIBUTE_UNUSED)
/* Check number of iterations. */
if (!desc->simple_p
|| desc->assumptions
+ || desc->infinite
|| !desc->const_iter
|| desc->niter != 0)
{
@@ -444,7 +445,8 @@ decide_peel_completely (struct loop *loop, int flags ATTRIBUTE_UNUSED)
/* Check number of iterations. */
if (!desc->simple_p
|| desc->assumptions
- || !desc->const_iter)
+ || !desc->const_iter
+ || desc->infinite)
{
if (dump_file)
fprintf (dump_file,