* cse.c (cse_insn): Don't lose REG_NON_LOCAL_GOTO note.
authorRichard Henderson <rth@redhat.com>
Mon, 16 Feb 2004 09:39:54 +0000 (01:39 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 16 Feb 2004 09:39:54 +0000 (01:39 -0800)
From-SVN: r77877

gcc/ChangeLog
gcc/cse.c

index d0d6d799ba8d3b545c1d2ac73480a6a31461967b..49ae020a1333af9c6851aff989104c30fa0ca4c3 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-16  Richard Henderson  <rth@redhat.com>
+
+       * cse.c (cse_insn): Don't lose REG_NON_LOCAL_GOTO note.
+
 2004-02-15  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.md: Remove unnecessary parallels from
index 55fe072105d3432cbdd0a330ed0c5bc7520f0f39..4262f4d3275c6f8ee019dcc7c75bbc28fd4926d3 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5719,10 +5719,20 @@ cse_insn (rtx insn, rtx libcall_insn)
             and hope for the best.  */
          if (n_sets == 1)
            {
-             rtx new = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn);
+             rtx new, note;
 
+             new = emit_jump_insn_after (gen_jump (XEXP (src, 0)), insn);
              JUMP_LABEL (new) = XEXP (src, 0);
              LABEL_NUSES (XEXP (src, 0))++;
+
+             /* Make sure to copy over REG_NON_LOCAL_GOTO.  */
+             note = find_reg_note (insn, REG_NON_LOCAL_GOTO, 0);
+             if (note)
+               {
+                 XEXP (note, 1) = NULL_RTX;
+                 REG_NOTES (new) = note;
+               }
+
              delete_insn (insn);
              insn = new;