diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-10-20 13:33:42 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-10-20 13:33:42 -0700 |
commit | 00c0c63c8a7da775717e12b474d865fa78653c50 (patch) | |
tree | 0ab55f7dd2da6c8163d4d9106bee9750cd1d27bb /gcc | |
parent | 2c14c928e7281f5ff05d76f9331580e016d79583 (diff) | |
download | gcc-00c0c63c8a7da775717e12b474d865fa78653c50.zip gcc-00c0c63c8a7da775717e12b474d865fa78653c50.tar.gz gcc-00c0c63c8a7da775717e12b474d865fa78653c50.tar.bz2 |
(loop_iterations): Move all failure exits after the computation of final_value.
From-SVN: r8324
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/unroll.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index 7d4e2d9..c82266e 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -3155,28 +3155,6 @@ loop_iterations (loop_start, loop_end) /* iteration_info already printed a message. */ return 0; - if (increment == 0) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Loop unrolling: Increment value can't be calculated.\n"); - return 0; - } - if (GET_CODE (increment) != CONST_INT) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Loop unrolling: Increment value not constant.\n"); - return 0; - } - if (GET_CODE (initial_value) != CONST_INT) - { - if (loop_dump_stream) - fprintf (loop_dump_stream, - "Loop unrolling: Initial value not constant.\n"); - return 0; - } - /* If the comparison value is an invariant register, then try to find its value from the insns before the start of the loop. */ @@ -3225,7 +3203,28 @@ loop_iterations (loop_start, loop_end) loop_increment = increment; loop_final_value = final_value; - if (final_value == 0) + if (increment == 0) + { + if (loop_dump_stream) + fprintf (loop_dump_stream, + "Loop unrolling: Increment value can't be calculated.\n"); + return 0; + } + else if (GET_CODE (increment) != CONST_INT) + { + if (loop_dump_stream) + fprintf (loop_dump_stream, + "Loop unrolling: Increment value not constant.\n"); + return 0; + } + else if (GET_CODE (initial_value) != CONST_INT) + { + if (loop_dump_stream) + fprintf (loop_dump_stream, + "Loop unrolling: Initial value not constant.\n"); + return 0; + } + else if (final_value == 0) { if (loop_dump_stream) fprintf (loop_dump_stream, |