diff options
author | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-05 04:22:05 +0000 |
---|---|---|
committer | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-05 04:22:05 +0000 |
commit | 1ae40d720c1c3138bb36bae6c10684e4ed63ea6e (patch) | |
tree | 66f1f29f90809d3c972660038dc06da6496d2113 /gcc | |
parent | 68224f8df257883ccb806659d64e64debadbc11f (diff) | |
download | gcc-1ae40d720c1c3138bb36bae6c10684e4ed63ea6e.tar.gz |
* gcse.c (try_replace_reg): Fix updating of note.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/gcse.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 60bfb0289e4..8a2653cf736 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/gcse.c b/gcc/gcse.c index e8c5f9a7929..06f7fd9efa0 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -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 |