(cse_insn): When do special handling for (set REG0 REG1), must delete
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 26 Jul 1995 13:31:00 +0000 (09:31 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 26 Jul 1995 13:31:00 +0000 (09:31 -0400)
REG_EQUAL note from insn if it mentions REG0.

From-SVN: r10169

gcc/cse.c

index 1b302f5e92f6b783f7a796e9b3600d343355f2f7..3c5ba6fae000bf25a7b41f5b206162c0d722e158 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7417,6 +7417,12 @@ cse_insn (insn, in_libcall_block)
              XEXP (note, 1) = REG_NOTES (prev);
              REG_NOTES (prev) = note;
            }
+
+         /* If INSN has a REG_EQUAL note, and this note mentions REG0,
+            then we must delete it, because the value in REG0 has changed.  */
+         note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
+         if (note && reg_mentioned_p (dest, XEXP (note, 0)))
+           remove_note (insn, note);
        }
     }