From f30c7901475fdf64ecad7067572e09e1b561f032 Mon Sep 17 00:00:00 2001 From: rakdver Date: Fri, 6 May 2005 20:24:00 +0000 Subject: 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 --- gcc/loop-unroll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/loop-unroll.c') 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, -- cgit v1.2.1