local-alloc.c (update_equiv_regs): Copy INSN_CODE to the new instruction.
authorRichard Henderson <rth@redhat.com>
Fri, 2 Feb 2001 01:03:47 +0000 (17:03 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 2 Feb 2001 01:03:47 +0000 (17:03 -0800)
        * local-alloc.c (update_equiv_regs): Copy INSN_CODE to the
        new instruction.

From-SVN: r39400

gcc/ChangeLog
gcc/local-alloc.c

index a9b2e373f3ccef21bb75abe8408f0a4885d100c7..522c2c5ed8aa99cc1cfae3af126b1d9cd0a3df11 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-01  Richard Henderson  <rth@redhat.com>
+
+       * local-alloc.c (update_equiv_regs): Copy INSN_CODE to the
+       new instruction.
+
 2001-02-01  Alexandre Oliva  <aoliva@redhat.com>
 
        * config/sh/crt1.asm (main_k): Modified so that start calls
index 1abe902015ca5bb57e34a06308dee29f063422a2..c743ad63fe83c61a98fb373cf112efaf9a22f359 100644 (file)
@@ -1141,9 +1141,13 @@ update_equiv_regs ()
                  rtx new_insn;
 
                  new_insn = emit_insn_before (PATTERN (equiv_insn), insn);
-                 REG_NOTES (PREV_INSN (insn)) = REG_NOTES (equiv_insn);
+                 REG_NOTES (new_insn) = REG_NOTES (equiv_insn);
                  REG_NOTES (equiv_insn) = 0;
 
+                 /* Make sure this insn is recognized before reload begins,
+                    otherwise eliminate_regs_in_insn will abort.  */
+                 INSN_CODE (new_insn) = INSN_CODE (equiv_insn);
+
                  PUT_CODE (equiv_insn, NOTE);
                  NOTE_LINE_NUMBER (equiv_insn) = NOTE_INSN_DELETED;
                  NOTE_SOURCE_FILE (equiv_insn) = 0;