OSDN Git Service

PR optimization/10955
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Jun 2003 03:34:02 +0000 (03:34 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Jun 2003 03:34:02 +0000 (03:34 +0000)
* unroll.c (unroll_loop): Fix off-by-one bug.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67870 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/unroll.c

index f5a84c0..182eab0 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-13  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR optimization/10955
+       * unroll.c (unroll_loop): Fix off-by-one bug.
+
 2003-06-12  Aldy Hernandez  <aldyh@redhat.com>
 
         * config/rs6000/rs6000.c (function_arg): Remove typo.
index 5a31745..0aaa68d 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-13  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * gcc.c-torture/execute/20030611-1.c: New test.
+
 2003-06-12  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/168
index 43539c3..e7e03ab 100644 (file)
@@ -791,9 +791,9 @@ unroll_loop (loop, insn_count, strength_reduce_p)
       /* We must limit the generic test to max_reg_before_loop, because only
         these pseudo registers have valid regno_first_uid info.  */
       for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
-       if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) <= max_uid_for_loop
+       if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
            && REGNO_FIRST_LUID (r) >= copy_start_luid
-           && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) <= max_uid_for_loop
+           && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
            && REGNO_LAST_LUID (r) <= copy_end_luid)
          {
            /* However, we must also check for loop-carried dependencies.