diff options
author | Michael Hayes <mhayes@redhat.com> | 2001-01-01 01:04:01 +0000 |
---|---|---|
committer | Michael Hayes <m.hayes@gcc.gnu.org> | 2001-01-01 01:04:01 +0000 |
commit | 86fee241f7c026808dcba406f62751dfbeac8c1c (patch) | |
tree | 168553bb855f69a9560df11aa4e6f6a692c8b648 /gcc/loop.c | |
parent | b2735d9a75162d5e0585ea5f615a8fc5bc544841 (diff) | |
download | gcc-86fee241f7c026808dcba406f62751dfbeac8c1c.zip gcc-86fee241f7c026808dcba406f62751dfbeac8c1c.tar.gz gcc-86fee241f7c026808dcba406f62751dfbeac8c1c.tar.bz2 |
loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds.
* loop.c (check_insn_for_bivs): Use ivs->n_regs to check array bounds.
(find_mem_givs, record_biv, maybe_eliminate_biv): Likewise.
(record_initial): Likewise.
* unroll.c (copy_loop_body, loop_iterations): Likewise.
(remap_split_bivs): Likewise.
From-SVN: r38584
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4651,7 +4651,7 @@ check_insn_for_bivs (loop, p, not_every_iteration, maybe_multiple) not_every_iteration, maybe_multiple); REG_IV_TYPE (ivs, REGNO (dest_reg)) = BASIC_INDUCT; } - else if (REGNO (dest_reg) < max_reg_before_loop) + else if (REGNO (dest_reg) < ivs->n_regs) REG_IV_TYPE (ivs, REGNO (dest_reg)) = NOT_BASIC_INDUCT; } } @@ -7842,7 +7842,7 @@ maybe_eliminate_biv (loop, bl, eliminate_p, threshold, insn_count) { unsigned int regno = REGNO (SET_DEST (set)); - if (regno < max_reg_before_loop + if (regno < ivs->n_regs && REG_IV_TYPE (ivs, regno) == GENERAL_INDUCT && REG_IV_INFO (ivs, regno)->src_reg == bl->biv->src_reg) p = last; @@ -8321,7 +8321,7 @@ record_initial (dest, set, data) struct iv_class *bl; if (GET_CODE (dest) != REG - || REGNO (dest) >= max_reg_before_loop + || REGNO (dest) >= ivs->n_regs || REG_IV_TYPE (ivs, REGNO (dest)) != BASIC_INDUCT) return; |