]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix incorrect handling of notes.
authorBernd Schmidt <bernds@redhat.com>
Tue, 19 Jun 2001 14:29:28 +0000 (14:29 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 19 Jun 2001 14:29:28 +0000 (14:29 +0000)
From-SVN: r43461

gcc/ChangeLog
gcc/regmove.c

index 627b33f757e9ea3d479824af4db774e34a1c011a..9a1a03ed76735dccf44e1e64fdc238f4355e0224 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.
+
 2001-05-22  Bernd Schmidt  <bernds@redhat.com>
 
        * sparc.md (movsf, movdf): Allow constant to integer reg moves.
index 800859582c75751c1e855986887215c29599b5ba..27c6d4af12c39009a46cdbfc847b5929806e95a7 100644 (file)
@@ -693,6 +693,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;
 
@@ -737,6 +740,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