sh.c (barrier_align): Recognize branch around far branch and redundant insn.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 11 Jan 2001 20:03:09 +0000 (20:03 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 11 Jan 2001 20:03:09 +0000 (20:03 +0000)
* config/sh/sh.c (barrier_align): Recognize branch around far
branch and redundant insn.

From-SVN: r38923

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

index 5189ef8a21e1b18775e9214334c904c32f10b5cb..6c1b1fe0e120f4167557bd7de18f07ed8c4283b9 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-11  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/sh/sh.c (barrier_align): Recognize branch around far
+       branch and redundant insn.
+
 2001-01-11  Neil Booth  <neil@daikokuya.demon.co.uk>
 
         * invoke.texi: Restore documentation of the drivers' switches -MD
index 158714cea50c6ca11405ec470f1aa5946966b67c..b73ab59bb3c529d4e4ca6d0d4c5e608d4230c597 100644 (file)
@@ -2862,7 +2862,11 @@ barrier_align (barrier_or_label)
       if (prev
          && GET_CODE (prev) == JUMP_INSN
          && JUMP_LABEL (prev)
-         && (jump_to_next || next_real_insn (JUMP_LABEL (prev)) == next))
+         && (jump_to_next || next_real_insn (JUMP_LABEL (prev)) == next
+             /* 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)))
        {
          rtx pat = PATTERN (prev);
          if (GET_CODE (pat) == PARALLEL)