unroll.c (loop_iterations): Fixup last patch.
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>
Thu, 11 Oct 2001 19:43:39 +0000 (19:43 +0000)
committerFranz Sirl <sirl@gcc.gnu.org>
Thu, 11 Oct 2001 19:43:39 +0000 (19:43 +0000)
2001-10-11  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

* unroll.c (loop_iterations): Fixup last patch.

From-SVN: r46197

gcc/ChangeLog
gcc/unroll.c

index 7c751673c35682153602373c5f726ff7184da001..c8d660cceec4d77a09dc2e4298cde51fa0bc5fd3 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-11  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       * unroll.c (loop_iterations): Fixup last patch.
+
 2001-10-11  Richard Henderson  <rth@redhat.com>
 
        * rtl.h (REG_VTABLE_REF): New.
index efb9de1db540d6400ac0cd2ce30ff808aa3278cf..4e15336b020bb62a53f40fde329588dbbc165731 100644 (file)
@@ -3527,12 +3527,11 @@ loop_iterations (loop)
 
       do
        {
-         /* Previous unrolling may have generated new insns not covered
-            by the uid_luid array.  */
-         if (INSN_UID (temp) >= max_uid_for_loop)
-           continue;
-
          if (GET_CODE (temp) == JUMP_INSN
+             /* Previous unrolling may have generated new insns not covered
+                by the uid_luid array.  */
+             && INSN_UID (JUMP_LABEL (temp)) < max_uid_for_loop
+             /* Check if we jump back into the loop body.  */
              && INSN_LUID (JUMP_LABEL (temp)) > INSN_LUID (loop->top)
              && INSN_LUID (JUMP_LABEL (temp)) < INSN_LUID (loop->cont))
            {