* combine.c (try_combine): Avoid barrier after noop jumps
authorJan Hubicka <jh@suse.cz>
Mon, 30 Jul 2001 10:54:10 +0000 (12:54 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 30 Jul 2001 10:54:10 +0000 (10:54 +0000)
From-SVN: r44470

gcc/ChangeLog
gcc/combine.c

index 74949b3aacc7bdb494b59ddf5e34c1e82adbbbf3..abbfb6b657d85c93066e252b72ce55f7ff016733 100644 (file)
@@ -1,3 +1,7 @@
+Mon Jul 30 12:52:11 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * combine.c (try_combine): Avoid barrier after noop jumps.
+
 2001-07-29  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
 
        * cpphash.h (struct cpp_reader): Remove import_warning.
index 4ece85a68129e844c40e03252de5e8021ca3c634..e9fdffcbaecd2fff9f5bbf41a8564d926c9d5629 100644 (file)
@@ -2763,10 +2763,7 @@ try_combine (i3, i2, i1, new_direct_jump_p)
        BARRIER following it since it may have initially been a
        conditional jump.  It may also be the last nonnote insn.  */
 
-    if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3)
-       || (GET_CODE (newpat) == SET
-           && SET_SRC (newpat) == pc_rtx
-           && SET_DEST (newpat) == pc_rtx))
+    if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3))
       {
        *new_direct_jump_p = 1;
 
@@ -2774,6 +2771,12 @@ try_combine (i3, i2, i1, new_direct_jump_p)
            || GET_CODE (temp) != BARRIER)
          emit_barrier_after (i3);
       }
+    /* An NOOP jump does not need barrier, but it does need cleaning up
+       of CFG.  */
+    if (GET_CODE (newpat) == SET
+       && SET_SRC (newpat) == pc_rtx
+       && SET_DEST (newpat) == pc_rtx)
+      *new_direct_jump_p = 1;
   }
 
   combine_successes++;