diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-01-20 17:30:34 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-01-20 17:30:34 -0800 |
commit | 5eeedd4d9e8e8c73c2263f1442d89f357ec6ff73 (patch) | |
tree | 19c65f204065e513919168fd286082d035c7a283 /gcc/loop.c | |
parent | 23ed92ca4c901a654040989a067819c1f0b77860 (diff) | |
download | gcc-5eeedd4d9e8e8c73c2263f1442d89f357ec6ff73.zip gcc-5eeedd4d9e8e8c73c2263f1442d89f357ec6ff73.tar.gz gcc-5eeedd4d9e8e8c73c2263f1442d89f357ec6ff73.tar.bz2 |
(scan_loop): For the replace_rtx call, copy the rtx that is
being substituted in before the call.
From-SVN: r8779
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -746,10 +746,12 @@ scan_loop (loop_start, end, nregs) && validate_replace_rtx (SET_DEST (set), SET_SRC (set), reg_single_usage[regno])) { - /* Replace any usage in a REG_EQUAL note. */ + /* Replace any usage in a REG_EQUAL note. Must copy the + new source, so that we don't get rtx sharing between the + SET_SOURCE and REG_NOTES of insn p. */ REG_NOTES (reg_single_usage[regno]) = replace_rtx (REG_NOTES (reg_single_usage[regno]), - SET_DEST (set), SET_SRC (set)); + SET_DEST (set), copy_rtx (SET_SRC (set))); PUT_CODE (p, NOTE); NOTE_LINE_NUMBER (p) = NOTE_INSN_DELETED; |