diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-19 14:34:23 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-19 14:34:23 +0000 |
commit | 6618e24d900eb1cfb7ef2dc7a3629ed809506d16 (patch) | |
tree | 6ac67c97d5cd4f5b33f45d5cd0c55d5fc749f23b /gcc/regmove.c | |
parent | 5890a06f05135381bafd0c01971af4335fb47ce8 (diff) | |
download | gcc-6618e24d900eb1cfb7ef2dc7a3629ed809506d16.tar.gz |
Fix incorrect note handling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index 910c422ee4f..85ca4efaa7d 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -703,6 +703,9 @@ optimize_reg_copy_3 (insn, dest, src) if (! (set = single_set (p)) || GET_CODE (SET_SRC (set)) != MEM + /* If there's a REG_EQUIV note, this must be an insn that loads an + argument. Prefer keeping the note over doing this optimization. */ + || find_reg_note (p, REG_EQUIV, NULL_RTX) || SET_DEST (set) != src_reg) return; @@ -747,6 +750,12 @@ optimize_reg_copy_3 (insn, dest, src) PUT_MODE (src_reg, old_mode); XEXP (src, 0) = src_reg; } + else + { + rtx note = find_reg_note (p, REG_EQUAL, NULL_RTX); + if (note) + remove_note (p, note); + } } |