]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/13877 (miscompilation with -O -funroll-loops on powerpc)
authorJames E Wilson <wilson@specifixinc.com>
Sat, 13 Mar 2004 01:19:05 +0000 (01:19 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Sat, 13 Mar 2004 01:19:05 +0000 (01:19 +0000)
        PR target/13877
        * unroll.c (unroll_loop): If precondition loop, clear the
        initial_value
        field in loop_info.

From-SVN: r79424

gcc/ChangeLog
gcc/unroll.c

index 6b14ab0997e52b66af23859a03f8e8512c8be31e..26fda29fb639ed64642367985f2ddc9e2db5e53b 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-10  James E Wilson  <wilson@specifixinc.com>
+
+       PR target/13877
+       * unroll.c (unroll_loop): If precondition loop, clear the initial_value
+       field in loop_info.
+       
 2004-03-12  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        Backport:
index 44f689cebac390d6d7379f1a6f7f7eab17056805..4c6f74ea1c7ac191840b0d1aff7d6e220b44f447 100644 (file)
@@ -1119,6 +1119,11 @@ unroll_loop (loop, insn_count, strength_reduce_p)
          unroll_type = UNROLL_MODULO;
          loop_preconditioned = 1;
 
+         /* Preconditioning changes the loop's initial value.  We set
+            it to an unknown value so that doloop_optimize won't get
+            confused.  */
+         loop_info->initial_value = 0;
+
          /* Clean up.  */
          free (labels);
        }