diff options
author | Josef Zlomek <zlomekj@suse.cz> | 2003-08-05 06:22:05 +0200 |
---|---|---|
committer | Josef Zlomek <zlomek@gcc.gnu.org> | 2003-08-05 04:22:05 +0000 |
commit | ed8395a03db5445a6763771dca20cc6836f3ee5f (patch) | |
tree | 66f1f29f90809d3c972660038dc06da6496d2113 /gcc/gcse.c | |
parent | ff66d28f7cf77786daf86a541aa0cfa28a150167 (diff) | |
download | gcc-ed8395a03db5445a6763771dca20cc6836f3ee5f.zip gcc-ed8395a03db5445a6763771dca20cc6836f3ee5f.tar.gz gcc-ed8395a03db5445a6763771dca20cc6836f3ee5f.tar.bz2 |
* gcse.c (try_replace_reg): Fix updating of note.
From-SVN: r70168
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |