sh.c (barrier_align): Don't ask for alignment when seeing a branch-around-a-jump...
authorJ"orn Rennecke <amylaar@redhat.com>
Wed, 20 Jun 2001 16:04:31 +0000 (16:04 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 20 Jun 2001 16:04:31 +0000 (17:04 +0100)
* sh.c (barrier_align): Don't ask for alignment when seeing a
branch-around-a-jump from machine_dependent_reorg.

From-SVN: r43474

gcc/ChangeLog
gcc/config/sh/sh.c

index 2a4c502e304af2a7bc7a6603e3bed69e156a3c26..f4d3494bdc3c778b38ef9b537d649fddaa6aed30 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jun 20 17:02:50 2001  J"orn Rennecke <amylaar@redhat.com>
+
+       * sh.c (barrier_align): Don't ask for alignment when seeing a
+       branch-around-a-jump from machine_dependent_reorg.
+
 Wed Jun 20 08:35:02 2001  Jeffrey A Law  (law@cygnus.com)
 
        * ssa.c (rename_block): Update parameter to remove_phi_alternative
index 8afb976381bdfddc86c61c520f33ccdad428a3e3..30d890e8dca6225507a1b120f770ddf51f606ee0 100644 (file)
@@ -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)