* reorg.c (fill_slots_from_thread): Do not copy frame-related insns.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 11 Nov 2014 22:31:09 +0000 (22:31 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 11 Nov 2014 22:31:09 +0000 (22:31 +0000)
From-SVN: r217381

gcc/ChangeLog
gcc/reorg.c

index 8c5122916cac0ba87a8105a402de07c40bd1b269..350f21d0af216eeb89a349475d9ef51d99574925 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * reorg.c (fill_slots_from_thread): Do not copy frame-related insns.
+
 2014-11-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR target/61535
index 6ade95cbe6dc46bc3ea6059b3cd698d743acbe4b..e8d29a4ab1e484c5dedb48590bbd2f49de14bd56 100644 (file)
@@ -2501,9 +2501,11 @@ fill_slots_from_thread (rtx_insn *insn, rtx condition, rtx thread_or_return,
 
          /* There are two ways we can win:  If TRIAL doesn't set anything
             needed at the opposite thread and can't trap, or if it can
-            go into an annulled delay slot.  */
+            go into an annulled delay slot.  But we want neither to copy
+            nor to speculate frame-related insns.  */
          if (!must_annul
-             && (condition == const_true_rtx
+             && ((condition == const_true_rtx
+                  && (own_thread || !RTX_FRAME_RELATED_P (trial)))
                  || (! insn_sets_resource_p (trial, &opposite_needed, true)
                      && ! may_trap_or_fault_p (pat)
                      && ! RTX_FRAME_RELATED_P (trial))))