]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* loop.c (check_dbra_loop): Allow LTU in the loop condition.
authorAndi Kleen <ak@muc.de>
Wed, 30 Jul 2003 20:28:45 +0000 (20:28 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 30 Jul 2003 20:28:45 +0000 (13:28 -0700)
From-SVN: r69971

gcc/ChangeLog
gcc/loop.c

index 8fadb8d77676ed7655eee9ccc260b530280d6af2..4346bdbac526678234d7448795372d6c8ffe37d8 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-30  Andi Kleen  <ak@muc.de>
+
+       * loop.c (check_dbra_loop): Allow LTU in the loop condition.
+
 2003-07-30  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
        * combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes.
index c4d2779a18c5129fe9082eec85d0ecb39bce5a8e..4a987d50337cfe65b15a19afd770682440b0702d 100644 (file)
@@ -8070,7 +8070,8 @@ check_dbra_loop (struct loop *loop, int insn_count)
          before_comparison = get_condition_for_loop (loop, p);
          if (before_comparison
              && XEXP (before_comparison, 0) == bl->biv->dest_reg
-             && GET_CODE (before_comparison) == LT
+             && (GET_CODE (before_comparison) == LT
+                 || GET_CODE (before_comparison) == LTU)
              && XEXP (before_comparison, 1) == const0_rtx
              && ! reg_set_between_p (bl->biv->dest_reg, p, loop_start)
              && INTVAL (bl->biv->add_val) == -1)
@@ -8241,7 +8242,8 @@ check_dbra_loop (struct loop *loop, int insn_count)
              /* for constants, LE gets turned into LT */
              && (GET_CODE (comparison) == LT
                  || (GET_CODE (comparison) == LE
-                     && no_use_except_counting)))
+                     && no_use_except_counting) 
+                 || GET_CODE (comparison) == LTU))
            {
              HOST_WIDE_INT add_val, add_adjust, comparison_val = 0;
              rtx initial_value, comparison_value;