(try_combine): Allow for the case where I3 becomes an
authorTom Wood <wood@gnu.org>
Wed, 16 Dec 1992 10:03:21 +0000 (10:03 +0000)
committerTom Wood <wood@gnu.org>
Wed, 16 Dec 1992 10:03:21 +0000 (10:03 +0000)
unconditional jump when it is the last nonnote insn.

From-SVN: r2881

gcc/combine.c

index 269c02cf829a27cf56d283fee492e41919c446df..331e6ce8d07aab73a87ea8e996dd05368abbb91a 100644 (file)
@@ -2091,10 +2091,11 @@ try_combine (i3, i2, i1)
 
     /* If I3 is now an unconditional jump, ensure that it has a 
        BARRIER following it since it may have initially been a
-       conditional jump.  */
+       conditional jump.  It may also be the last nonnote insn.  */
 
     if ((GET_CODE (newpat) == RETURN || simplejump_p (i3))
-       && GET_CODE (next_nonnote_insn (i3)) != BARRIER)
+       && ((temp = next_nonnote_insn (i3)) == NULL_RTX
+           || GET_CODE (temp) != BARRIER))
       emit_barrier_after (i3);
   }