aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-03-02 13:05:09 -0800
committerJim Wilson <wilson@gcc.gnu.org>1993-03-02 13:05:09 -0800
commit51ec2375642c91567b231ddb9e06f61e33734a89 (patch)
tree561932c501fedb3497ffd35244fd795ed845f535 /gcc
parentfda792c6b67ea6b7d1e8b92b813b7f85e1d12f24 (diff)
downloadgcc-51ec2375642c91567b231ddb9e06f61e33734a89.zip
gcc-51ec2375642c91567b231ddb9e06f61e33734a89.tar.gz
gcc-51ec2375642c91567b231ddb9e06f61e33734a89.tar.bz2
(relax_delay_slots): Delete jump around insn identical
to the insn in its delay slot. From-SVN: r3606
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reorg.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index efbc078..e78c44c 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3440,6 +3440,19 @@ relax_delay_slots (first)
continue;
}
+ /* See if this is an unconditional jump around a single insn which is
+ identical to the one in its delay slot. In this case, we can just
+ delete the branch and the insn in its delay slot. */
+ if (next && GET_CODE (next) == INSN
+ && prev_label (next_active_insn (next)) == target_label
+ && simplejump_p (insn)
+ && XVECLEN (pat, 0) == 2
+ && rtx_equal_p (PATTERN (next), PATTERN (XVECEXP (pat, 0, 1))))
+ {
+ delete_insn (insn);
+ continue;
+ }
+
/* See if this jump (with its delay slots) branches around another
jump (without delay slots). If so, invert this jump and point
it to the target of the second jump. We cannot do this for