aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-09-28 14:18:17 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-09-28 14:18:17 -0700
commit57467646666ba0d8790a9fdc3e35390b5bf1dade (patch)
tree76970d172cc7d93f7ca44112361b1d4c5e78810c /gcc
parent72f4648ec51398d2985f5b30922df02d8f8ade69 (diff)
downloadgcc-57467646666ba0d8790a9fdc3e35390b5bf1dade.zip
gcc-57467646666ba0d8790a9fdc3e35390b5bf1dade.tar.gz
gcc-57467646666ba0d8790a9fdc3e35390b5bf1dade.tar.bz2
(copy_loop_body, JUMP_INSN case): When setting JUMP_LABEL field, verify that what we think is a label actually is.
(copy_loop_body, JUMP_INSN case): When setting JUMP_LABEL field, verify that what we think is a label actually is. If it isn't then map the old JUMP_LABEL to find the new one. From-SVN: r2275
Diffstat (limited to 'gcc')
-rw-r--r--gcc/unroll.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index aa8db72..6ca4bad 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -1692,23 +1692,28 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
later passes of unroll_loop, if INSN had jump label set. */
if (JUMP_LABEL (insn))
{
+ rtx label = 0;
+
/* Can't use the label_map for every insn, since this may be
the backward branch, and hence the label was not mapped. */
if (GET_CODE (pattern) == SET)
{
tem = SET_SRC (pattern);
if (GET_CODE (tem) == LABEL_REF)
- JUMP_LABEL (copy) = XEXP (tem, 0);
+ label = XEXP (tem, 0);
else if (GET_CODE (tem) == IF_THEN_ELSE)
{
if (XEXP (tem, 1) != pc_rtx)
- JUMP_LABEL (copy) = XEXP (XEXP (tem, 1), 0);
+ label = XEXP (XEXP (tem, 1), 0);
else
- JUMP_LABEL (copy) = XEXP (XEXP (tem, 2), 0);
+ label = XEXP (XEXP (tem, 2), 0);
}
else
abort ();
}
+
+ if (label && GET_CODE (label) == CODE_LABEL)
+ JUMP_LABEL (copy) = label;
else
{
/* An unrecognizable jump insn, probably the entry jump