summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1995-04-04 21:16:40 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1995-04-04 21:16:40 +0000
commit6bd5d07a52496a85dfb92f279acbaba1be47145b (patch)
treeda02dea3c1b5dc2fb88cf7d54e345a183fef2e73 /gcc/reorg.c
parent11682839619bab6758add75bd10975127d014d8d (diff)
downloadgcc-6bd5d07a52496a85dfb92f279acbaba1be47145b.tar.gz
* reorg.c (fill_simple_delay_slots): Don't use a JUMP_INSN
a the target of another JUMP_INSN to fill a delay slot. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9312 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 4c36d33b3fb..f4667ca094e 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3103,7 +3103,9 @@ fill_simple_delay_slots (first, non_jumps_p)
/* If there are slots left to fill and our search was stopped by an
unconditional branch, try the insn at the branch target. We can
- redirect the branch if it works. */
+ redirect the branch if it works.
+
+ Don't do this if the insn at the branch target is a branch. */
if (slots_to_fill != slots_filled
&& trial
&& GET_CODE (trial) == JUMP_INSN
@@ -3112,6 +3114,7 @@ fill_simple_delay_slots (first, non_jumps_p)
&& (next_trial = next_active_insn (JUMP_LABEL (trial))) != 0
&& ! (GET_CODE (next_trial) == INSN
&& GET_CODE (PATTERN (next_trial)) == SEQUENCE)
+ && GET_CODE (next_trial) != JUMP_INSN
&& ! insn_references_resource_p (next_trial, &set, 1)
&& ! insn_sets_resource_p (next_trial, &set, 1)
&& ! insn_sets_resource_p (next_trial, &needed, 1)