OSDN Git Service

Fix incorrect note handling.
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Jun 2001 14:34:23 +0000 (14:34 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Jun 2001 14:34:23 +0000 (14:34 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43462 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/regmove.c

index ab7ae32..2e4b255 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-19  Bernd Schmidt  <bernds@redhat.com>
+
+       * regmove.c (optimize_reg_copy_3): Do nothing if previous insn
+       carries a REG_EQUIV note.  If it carries REG_EQUAL, delete the
+       note.
+
 Tue Jun 19 07:53:52 2001  Jeffrey A Law  (law@cygnus.com)
 
        * ssa.c (ssa_uses): Remove definition.
index 910c422..85ca4ef 100644 (file)
@@ -703,6 +703,9 @@ optimize_reg_copy_3 (insn, dest, src)
 
   if (! (set = single_set (p))
       || GET_CODE (SET_SRC (set)) != MEM
+      /* If there's a REG_EQUIV note, this must be an insn that loads an
+        argument.  Prefer keeping the note over doing this optimization.  */
+      || find_reg_note (p, REG_EQUIV, NULL_RTX)
       || SET_DEST (set) != src_reg)
     return;
 
@@ -747,6 +750,12 @@ optimize_reg_copy_3 (insn, dest, src)
       PUT_MODE (src_reg, old_mode);
       XEXP (src, 0) = src_reg;
     }
+  else
+    {
+      rtx note = find_reg_note (p, REG_EQUAL, NULL_RTX);
+      if (note)
+       remove_note (p, note);
+    }
 }
 
 \f