2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2024-12-26 06:19:24 +08:00

* gcse.c (try_replace_reg): Fix updating of note.

From-SVN: r70168
This commit is contained in:
Josef Zlomek 2003-08-05 06:22:05 +02:00 committed by Josef Zlomek
parent ff66d28f7c
commit ed8395a03d
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2003-08-05 Josef Zlomek <zlomekj@suse.cz>
* gcse.c (try_replace_reg): Fix updating of note.
2003-08-04 Roger Sayle <roger@eyesopen.com>
PR middle-end/11771

View File

@ -3849,6 +3849,11 @@ try_replace_reg (rtx from, rtx to, rtx insn)
validate_change (insn, &SET_SRC (set), src, 0);
}
/* If there is already a NOTE, update the expression in it with our
replacement. */
if (note != 0)
XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0), from, to);
if (!success && set && reg_mentioned_p (from, SET_SRC (set)))
{
/* If above failed and this is a single set, try to simplify the source of
@ -3869,11 +3874,6 @@ try_replace_reg (rtx from, rtx to, rtx insn)
note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
}
/* If there is already a NOTE, update the expression in it with our
replacement. */
else if (note != 0)
XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0), from, to);
/* REG_EQUAL may get simplified into register.
We don't allow that. Remove that note. This code ought
not to happen, because previous code ought to synthesize