diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 1998-02-08 14:12:00 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 1998-02-08 09:12:00 -0500 |
commit | 72b0c616a5f06426c90bbf29eabd4f2492542833 (patch) | |
tree | 5f83a6c3343af054169947a00c9dbfab38f58ff7 /gcc | |
parent | 2e0dd623cd843a28beb1a83d0e0307166b0600d5 (diff) | |
download | gcc-72b0c616a5f06426c90bbf29eabd4f2492542833.zip gcc-72b0c616a5f06426c90bbf29eabd4f2492542833.tar.gz gcc-72b0c616a5f06426c90bbf29eabd4f2492542833.tar.bz2 |
Feb 8 14:56:03 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Feb 8 14:56:03 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* loop.c (strength_reduce): When placing increment for auto-inc
case, do comparison in loop order.
From-SVN: r17781
Diffstat (limited to 'gcc')
-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 68c777d..e27249e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Feb 8 14:56:03 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * loop.c (strength_reduce): When placing increment for auto-inc + case, do comparison in loop order. + Sun Feb 8 13:21:38 1998 John Carr <jfc@mit.edu> * bitmap.c (bitmap_debug_file): HOST_PTR_PRINTF converts a pointer, @@ -4114,8 +4114,14 @@ strength_reduce (scan_start, end, loop_top, insn_count, auto_inc_opt = 1; } /* Check for case where increment is before the the address - giv. */ - else if (INSN_LUID (v->insn) > INSN_LUID (bl->biv->insn)) + giv. Do this test in "loop order". */ + else if ((INSN_LUID (v->insn) > INSN_LUID (bl->biv->insn) + && (INSN_LUID (v->insn) < INSN_LUID (scan_start) + || (INSN_LUID (bl->biv->insn) + > INSN_LUID (scan_start)))) + || (INSN_LUID (v->insn) < INSN_LUID (scan_start) + && (INSN_LUID (scan_start) + < INSN_LUID (bl->biv->insn)))) auto_inc_opt = -1; else auto_inc_opt = 1; |