aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>1998-11-25 20:51:09 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>1998-11-25 20:51:09 +0000
commita70603680e368c79db0f0b3f7ea2bd792f0d9b6d (patch)
tree0696cfb08feb8f43843cd461c5d10fbad1798b83 /gcc/loop.c
parent959e0a760641de7d2d5090b0b30a6077079530df (diff)
downloadgcc-a70603680e368c79db0f0b3f7ea2bd792f0d9b6d.zip
gcc-a70603680e368c79db0f0b3f7ea2bd792f0d9b6d.tar.gz
gcc-a70603680e368c79db0f0b3f7ea2bd792f0d9b6d.tar.bz2
loop.c (check_dbra_loop): Update JUMP_LABEL field of jump insn when loop reversed.
* loop.c (check_dbra_loop): Update JUMP_LABEL field of jump insn when loop reversed. * unroll.c (precondition_loop_p): Return loop_initial_value for initial_value instead of loop_iteration_var. From-SVN: r23881
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index b664e38..4fb5198 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -7107,16 +7107,18 @@ check_dbra_loop (loop_end, insn_count, loop_start)
end_sequence ();
emit_jump_insn_before (tem, loop_end);
+ for (tem = PREV_INSN (loop_end);
+ tem && GET_CODE (tem) != JUMP_INSN;
+ tem = PREV_INSN (tem))
+ ;
+
+ if (tem)
+ JUMP_LABEL (tem) = XEXP (jump_label, 0);
+
if (nonneg)
{
- for (tem = PREV_INSN (loop_end);
- tem && GET_CODE (tem) != JUMP_INSN;
- tem = PREV_INSN (tem))
- ;
if (tem)
{
- JUMP_LABEL (tem) = XEXP (jump_label, 0);
-
/* Increment of LABEL_NUSES done above. */
/* Register is now always nonnegative,
so add REG_NONNEG note to the branch. */