aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sh
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@redhat.com>2001-06-20 16:04:31 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2001-06-20 17:04:31 +0100
commit5d291213315a18afad4054e4cdcfdd303ed42fd2 (patch)
tree86cbdef44ee2df251205d9432c0528204188c0a0 /gcc/config/sh
parent5e93ca86989eddaedb7c6fac12168f1f9ca9786a (diff)
downloadgcc-5d291213315a18afad4054e4cdcfdd303ed42fd2.zip
gcc-5d291213315a18afad4054e4cdcfdd303ed42fd2.tar.gz
gcc-5d291213315a18afad4054e4cdcfdd303ed42fd2.tar.bz2
sh.c (barrier_align): Don't ask for alignment when seeing a branch-around-a-jump from...
* sh.c (barrier_align): Don't ask for alignment when seeing a branch-around-a-jump from machine_dependent_reorg. From-SVN: r43474
Diffstat (limited to 'gcc/config/sh')
-rw-r--r--gcc/config/sh/sh.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 8afb976..30d890e 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -2941,7 +2941,15 @@ barrier_align (barrier_or_label)
/* If relax_delay_slots() decides NEXT was redundant
with some previous instruction, it will have
redirected PREV's jump to the following insn. */
- || JUMP_LABEL (prev) == next_nonnote_insn (next)))
+ || JUMP_LABEL (prev) == next_nonnote_insn (next)
+ /* There is no upper bound on redundant instructions that
+ might have been skipped, but we must not put an alignment
+ where none had been before. */
+ || (NEXT_INSN (PREV_INSN (prev)) != prev
+ && ((INSN_CODE (NEXT_INSN (NEXT_INSN (prev)))
+ == CODE_FOR_block_branch_redirect)
+ || (INSN_CODE (NEXT_INSN (NEXT_INSN (prev)))
+ == CODE_FOR_indirect_jump_scratch)))))
{
rtx pat = PATTERN (prev);
if (GET_CODE (pat) == PARALLEL)