doloop.c (doloop_modify_runtime <biv skips initial incr>): Adjust by absolute loop...
authorAlan Modra <amodra@bigpond.net.au>
Thu, 26 Sep 2002 23:01:31 +0000 (23:01 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 26 Sep 2002 23:01:31 +0000 (08:31 +0930)
* doloop.c (doloop_modify_runtime <biv skips initial incr>): Adjust
by absolute loop increment, not loop increment.

From-SVN: r57556

gcc/ChangeLog
gcc/doloop.c

index 3be743b..2458c15 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * doloop.c (doloop_modify_runtime <biv skips initial incr>): Adjust
+       by absolute loop increment, not loop increment.
+
 2002-09-26  Kazu Hirata  <kazu@cs.umass.edu>
 
        * c-common.h: Follow spelling conventions.
index f79fbad..3e1c7b1 100644 (file)
@@ -668,8 +668,8 @@ doloop_modify_runtime (loop, iterations_max,
            fprintf (loop_dump_stream,
                 "Doloop: Basic induction var skips initial incr.\n");
 
-         diff = expand_simple_binop (mode, PLUS, diff, increment, diff,
-                                     unsigned_p, OPTAB_LIB_WIDEN);
+         diff = expand_simple_binop (mode, PLUS, diff, GEN_INT (abs_inc),
+                                     diff, unsigned_p, OPTAB_LIB_WIDEN);
        }
     }