From edeac5de33e2a82c2641ca34c26b9e5bbdec5b49 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 30 Jul 2003 20:28:45 +0000 Subject: [PATCH] * loop.c (check_dbra_loop): Allow LTU in the loop condition. From-SVN: r69971 --- gcc/ChangeLog | 4 ++++ gcc/loop.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fadb8d7767..4346bdbac52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-07-30 Andi Kleen + + * loop.c (check_dbra_loop): Allow LTU in the loop condition. + 2003-07-30 Zdenek Dvorak * combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes. 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; -- 2.30.2