This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] doloop partial loops adjustment (PPC regression)

	The appended patch, written by Zdenek and already added to the LNO
branch, fixes the Tree-SSA doloop failure exposed by execute/920411-1.c.
The patch adjusts the number of iterations to take into account partial
loops.  It's an interim fix until the doloop functionality is replaced
using the rewrite on the LNO branch.

	Okay for Tree-SSA branch?

Thanks, David

	* doloop.c (doloop_optimize): Increment n_iterations if loop->top

Index: doloop.c
RCS file: /cvs/gcc/gcc/gcc/doloop.c,v
retrieving revision
diff -c -p -r1.19.2.10 doloop.c
*** doloop.c	13 Feb 2004 13:11:21 -0000
--- doloop.c	29 Feb 2004 02:17:53 -0000
*************** doloop_optimize (const struct loop *loop
*** 785,790 ****
--- 785,794 ----
    n_iterations = loop_info->n_iterations;
    if (n_iterations)
+       /* See the comment in doloop_modify_runtime.  */
+       if (loop->top)
+ 	n_iterations += loop_info->unroll_number;
        /* This is the simple case where the initial and final loop
  	 values are constants.  */
        n_iterations_max = n_iterations;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]