]> gcc.gnu.org Git - gcc.git/commitdiff
unroll.c (loop_iterations): Return 0 if the add_val for a BIV is REG.
authorGraham Stott <grahams@redhat.com>
Wed, 27 Feb 2002 15:01:10 +0000 (15:01 +0000)
committerGraham Stott <grahams@gcc.gnu.org>
Wed, 27 Feb 2002 15:01:10 +0000 (15:01 +0000)
        * unroll.c (loop_iterations): Return 0 if the add_val for
        a BIV is REG.

From-SVN: r50100

gcc/ChangeLog
gcc/unroll.c

index 025b4e863042135c46c8abddb16960251033a61a..062716db49250ec96bae11d0c9c73f5893fe3543 100644 (file)
@@ -1,5 +1,8 @@
 2002-02-27  Graham Stott  <grahams@redhat.com>
 
+       * unroll.c (loop_iterations): Return 0 if the add_val for
+       a BIV is REG.
+
        * final.c (output_operand_lossage): Constify PFX_STR.
 
        * df.c (df_insn_refs_record): Use XEXP (x, 0) for USE.
index 9a0cfcf6871cf2fd3a199b40fa7f2d36d42a7983..2b941470ecdaf551920b5cf2394c6534b226016c 100644 (file)
@@ -3744,7 +3744,18 @@ loop_iterations (loop)
          for (biv_inc = bl->biv; biv_inc; biv_inc = biv_inc->next_iv)
            {
              if (loop_insn_first_p (v->insn, biv_inc->insn))
-               offset -= INTVAL (biv_inc->add_val);
+               {
+                 if (REG_P (biv_inc->add_val))
+                   {
+                     if (loop_dump_stream)
+                       fprintf (loop_dump_stream,
+                                "Loop iterations: Basic induction var add_val is REG %d.\n",
+                                REGNO (biv_inc->add_val));
+                       return 0;
+                   }
+
+                 offset -= INTVAL (biv_inc->add_val);
+               }
            }
        }
       if (loop_dump_stream)
This page took 0.075538 seconds and 5 git commands to generate.