aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-12-31 12:47:49 -0800
committerJim Wilson <wilson@gcc.gnu.org>1992-12-31 12:47:49 -0800
commit483404b6dc558ee5c38657e06c66ba059d7b25aa (patch)
treef03fa69f858eb96c4e68265a3fd8c947867d849b /gcc/unroll.c
parentfeaf9c711cb08dfb41200f07fcd2e081d585c6c7 (diff)
downloadgcc-483404b6dc558ee5c38657e06c66ba059d7b25aa.zip
gcc-483404b6dc558ee5c38657e06c66ba059d7b25aa.tar.gz
gcc-483404b6dc558ee5c38657e06c66ba059d7b25aa.tar.bz2
(copy_loop_body...
(copy_loop_body, JUMP_INSN case): Do map the body of the loop branch back, then rewrite it to jump past the end of the unrolled loop. From-SVN: r3014
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 459a2b3..b58066d 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -1651,6 +1651,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
break;
case JUMP_INSN:
+ pattern = copy_rtx_and_substitute (PATTERN (insn), map);
+ copy = emit_jump_insn (pattern);
+
if (JUMP_LABEL (insn) == start_label && insn == copy_end
&& ! last_iteration)
{
@@ -1659,21 +1662,14 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
In this case, we want to change the original fall through
case to be a branch past the end of the loop, and the
original jump label case to fall_through. */
- /* Never map the label in this case. */
-
- pattern = copy_rtx (PATTERN (insn));
- copy = emit_jump_insn (pattern);
if (! invert_exp (pattern, copy)
- || ! redirect_exp (&pattern, JUMP_LABEL (insn),
+ || ! redirect_exp (&pattern,
+ map->label_map[CODE_LABEL_NUMBER
+ (JUMP_LABEL (insn))],
exit_label, copy))
abort ();
}
- else
- {
- pattern = copy_rtx_and_substitute (PATTERN (insn), map);
- copy = emit_jump_insn (pattern);
- }
#ifdef HAVE_cc0
if (cc0_insn)