diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-02 23:50:36 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-02 23:50:36 +0000 |
commit | bb0d62ae05ed03601d885ecae5cad00b157731e9 (patch) | |
tree | 28c8e5534186ab6d08dd8af2ed6313c642b40a55 | |
parent | 6bfd5083bbda841256d11ada370b9acff6d72642 (diff) | |
download | gcc-bb0d62ae05ed03601d885ecae5cad00b157731e9.tar.gz |
* loop.c (strength_reduce): When doing biv->giv conversion, update
reg note of NEXT->insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28423 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/loop.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ec52047468..fe7eec16a01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 3 00:45:02 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * loop.c (strength_reduce): When doing biv->giv conversion, update + reg note of NEXT->insn. + 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz> * real.c (PUT_REAL): Clear unused bytes if long double is IEEE quad. diff --git a/gcc/loop.c b/gcc/loop.c index 0b02cc2a41c..255af0e5703 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -4205,7 +4205,7 @@ strength_reduce (scan_start, end, loop_top, insn_count, for (vp = &bl->biv, next = *vp; v = next, next = v->next_iv;) { HOST_WIDE_INT offset; - rtx set, add_val, old_reg, dest_reg, last_use_insn; + rtx set, add_val, old_reg, dest_reg, last_use_insn, note; int old_regno, new_regno; if (! v->always_executed @@ -4311,7 +4311,13 @@ strength_reduce (scan_start, end, loop_top, insn_count, REG_IV_TYPE (new_regno) = GENERAL_INDUCT; REG_IV_INFO (new_regno) = v; - + + /* If next_insn has a REG_EQUAL note that mentiones OLD_REG, + it must be replaced. */ + note = find_reg_note (next->insn, REG_EQUAL, NULL_RTX); + if (note && reg_mentioned_p (old_reg, XEXP (note, 0))) + XEXP (note, 0) = copy_rtx (SET_SRC (single_set (next->insn))); + /* Remove the increment from the list of biv increments, and record it as a giv. */ *vp = next; |