summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-19 16:31:40 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-19 16:31:40 +0000
commit4c694afdd6d97862c1def563817cc311ad081646 (patch)
treefafb870ae109ad3c315b6adeec4971854e4b7bf8 /gcc
parentccda5e559447efddf481a8cece2c95cfd593735f (diff)
downloadgcc-4c694afdd6d97862c1def563817cc311ad081646.tar.gz
* loop.c (loop_givs_rescan): Delete the REG_EQUAL note, not the insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55590 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/loop.c14
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7e943e4affe..b0b58100383 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-19 Richard Henderson <rth@redhat.com>
+
+ * loop.c (loop_givs_rescan): Delete the REG_EQUAL note, not the insn.
+
2002-07-19 Alan Modra <amodra@bigpond.net.au>
* prefix.c (update_path): Don't zap single `.' path components
diff --git a/gcc/loop.c b/gcc/loop.c
index 5966324dc34..c943c6d8905 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -4875,6 +4875,7 @@ loop_givs_rescan (loop, bl, reg_map)
else
{
rtx original_insn = v->insn;
+ rtx note;
/* Not replaceable; emit an insn to set the original giv reg from
the reduced giv, same as above. */
@@ -4882,12 +4883,13 @@ loop_givs_rescan (loop, bl, reg_map)
gen_move_insn (v->dest_reg,
v->new_reg));
- /* The original insn may have a REG_EQUAL note. This note is
- now incorrect and may result in invalid substitutions later.
- We could just delete the note, but we know that the entire
- insn is dead, so we might as well save ourselves the bother
- and remove the whole thing. */
- delete_insn (original_insn);
+ /* The original insn may have a REG_EQUAL note. This note is
+ now incorrect and may result in invalid substitutions later.
+ The original insn is dead, but may be part of a libcall
+ sequence, which doesn't seem worth the bother of handling. */
+ note = find_reg_note (original_insn, REG_EQUAL, NULL_RTX);
+ if (note)
+ remove_note (original_insn, note);
}
/* When a loop is reversed, givs which depend on the reversed