summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-30 20:28:45 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-30 20:28:45 +0000
commitf0422dfab041cf25c68461c023f974c19717c63e (patch)
tree0c3bb9bd40751351e4c41eb0c315bf0ee6f7db77 /gcc/loop.c
parentcf40db41ee40522222ef279f708710d580c944ad (diff)
downloadgcc-f0422dfab041cf25c68461c023f974c19717c63e.tar.gz
* loop.c (check_dbra_loop): Allow LTU in the loop condition.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69971 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index c4d2779a18c..4a987d50337 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -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;