re PR rtl-optimization/19462 (generating return insns while current_function_epilogue...
authorHans-Peter Nilsson <hp@axis.com>
Wed, 19 Jan 2005 16:39:20 +0000 (16:39 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Wed, 19 Jan 2005 16:39:20 +0000 (16:39 +0000)
PR rtl-optimization/19462
* reorg.c (find_end_label): Create return insn only if
current_function_epilogue_delay_list is empty.

From-SVN: r93901

gcc/ChangeLog
gcc/reorg.c

index e36882b6aed4a2a97c7b8a53a4b26fc5aacc6853..87dff43f90d130df2f9c39be04d1aff269440491 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-19  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR rtl-optimization/19462
+       * reorg.c (find_end_label): Create return insn only if
+       current_function_epilogue_delay_list is empty.
+
 2005-01-19  Paolo Bonzini  <bonzini@gnu.org>
 
        * doc/passes.texi: Remove paragraph mentioning new-ra.
index fbaf968df73f2fa519504541c65ea347f278b3f1..78940ff9a5804acc0c8edecdec358aa684240b41 100644 (file)
@@ -420,7 +420,12 @@ find_end_label (void)
             if needed.  */
          emit_label (end_of_function_label);
 #ifdef HAVE_return
-         if (HAVE_return)
+         /* We don't bother trying to create a return insn if the
+            epilogue has filled delay-slots; we would have to try and
+            move the delay-slot fillers to the delay-slots for the new
+            return insn or in front of the new return insn.  */
+         if (current_function_epilogue_delay_list == NULL
+             && HAVE_return)
            {
              /* The return we make may have delay slots too.  */
              rtx insn = gen_return ();