diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2005-05-06 22:24:00 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2005-05-06 20:24:00 +0000 |
commit | 4fbe4f91ff05cb6f4f9507fde1b63102a117e40f (patch) | |
tree | d915060a51b36c45e01302a15b2e5cc3e27f761c /gcc/loop-unroll.c | |
parent | 6245372caaee11600cf7aab808ff30bfaccaf4e8 (diff) | |
download | gcc-4fbe4f91ff05cb6f4f9507fde1b63102a117e40f.zip gcc-4fbe4f91ff05cb6f4f9507fde1b63102a117e40f.tar.gz gcc-4fbe4f91ff05cb6f4f9507fde1b63102a117e40f.tar.bz2 |
re PR rtl-optimization/21254 (Incorrect code with -funroll-loops for multiple targets with same code)
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.
From-SVN: r99332
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r-- | gcc/loop-unroll.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 409df0c..68512d0 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, |