diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-11 17:43:07 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-11 17:43:07 +0000 |
commit | 9ef5c93fc8e346c2f013961c6d05945259989ce8 (patch) | |
tree | 010adf946ea1a78c7e0483714998dbd539c64a80 /gcc/gcse.c | |
parent | a9b427d34a9ac1911c0a0d25639fd18eb51b8ea7 (diff) | |
download | gcc-9ef5c93fc8e346c2f013961c6d05945259989ce8.tar.gz |
PR rtl-optimization/27073
* gcse.c (try_replace_reg): Revert last change. Continue to search
for both REG_EQUAL and REG_EQUIV notes, but only perform replacements
on the former.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index 0dbbe0bb6e1..1c000a2e8cf 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -2642,7 +2642,7 @@ find_used_regs (rtx *xptr, void *data ATTRIBUTE_UNUSED) static int try_replace_reg (rtx from, rtx to, rtx insn) { - rtx note = find_reg_note (insn, REG_EQUAL, NULL); + rtx note = find_reg_equal_equiv_note (insn); rtx src = 0; int success = 0; rtx set = single_set (insn); @@ -2660,9 +2660,9 @@ 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) + /* If there is already a REG_EQUAL note, update the expression in it + with our replacement. */ + if (note != 0 && REG_NOTE_KIND (note) == REG_EQUAL) XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0), from, to); if (!success && set && reg_mentioned_p (from, SET_SRC (set))) @@ -2689,7 +2689,7 @@ try_replace_reg (rtx from, rtx to, rtx insn) We don't allow that. Remove that note. This code ought not to happen, because previous code ought to synthesize reg-reg move, but be on the safe side. */ - if (note && REG_P (XEXP (note, 0))) + if (note && REG_NOTE_KIND (note) == REG_EQUAL && REG_P (XEXP (note, 0))) remove_note (insn, note); return success; |