https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88129

--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #7)
> Let's keep the PR open for the eventual removal of the remaining blockage
> instruction for targets that emit unwind information in the epilogue.
FTR, the following patch works OK on x86_64-linux-gnu (bootstrap + regression
test of all default languages, obj-c++ and go):

Index: function.c
===================================================================
--- function.c  (revision 266278)
+++ function.c  (working copy)
@@ -5447,13 +5447,6 @@ expand_function_end (void)
   if (naked_return_label)
     emit_label (naked_return_label);

-  /* @@@ This is a kludge.  We want to ensure that instructions that
-     may trap are not moved into the epilogue by scheduling, because
-     we don't always emit unwind information for the epilogue.  */
-  if (cfun->can_throw_non_call_exceptions
-      && targetm_common.except_unwind_info (&global_options) != UI_SJLJ)
-    emit_insn (gen_blockage ());
-
   /* If stack protection is enabled for this function, check the guard.  */
   if (crtl->stack_protect_guard && targetm.stack_protect_runtime_enabled_p ())
     stack_protect_epilogue ();

Reply via email to