loop.c (check_dbra_loop): Use a vanilla loop reversal if the biv is used to compute a giv or as some...
* loop.c (check_dbra_loop): Use a vanilla loop reversal if the biv is used to compute a giv or as some other non-counting use. From-SVN: r22684
This commit is contained in:
parent
c1daea12d5
commit
c5cbf81ecf
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 30 18:29:26 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* loop.c (check_dbra_loop): Use a vanilla loop reversal if the biv is
|
||||
used to compute a giv or as some other non-counting use.
|
||||
|
||||
Wed Sep 30 18:19:27 1998 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
|
||||
|
||||
* regs.h (HARD_REGNO_CALLER_SAVE_MODE): New macro.
|
||||
|
|
12
gcc/loop.c
12
gcc/loop.c
|
@ -6992,9 +6992,13 @@ check_dbra_loop (loop_end, insn_count, loop_start)
|
|||
if (initial_value == const0_rtx
|
||||
/* If we have a decrement_and_branch_on_count, prefer
|
||||
the NE test, since this will allow that instruction to
|
||||
be generated. */
|
||||
be generated. Note that we must use a vanilla loop
|
||||
reversal if the biv is used to calculate a giv or has
|
||||
a non-counting use. */
|
||||
#if ! defined (HAVE_decrement_and_branch_until_zero) && defined (HAVE_decrement_and_branch_on_count)
|
||||
&& (add_val != 1 || ! vtop)
|
||||
&& (! (add_val == 1 && vtop
|
||||
&& (bl->biv_count == 0
|
||||
|| no_use_except_counting)))
|
||||
#endif
|
||||
&& GET_CODE (comparison_value) == CONST_INT
|
||||
/* Now do postponed overflow checks on COMPARISON_VAL. */
|
||||
|
@ -7007,7 +7011,9 @@ check_dbra_loop (loop_end, insn_count, loop_start)
|
|||
nonneg = 1;
|
||||
cmp_code = GE;
|
||||
}
|
||||
else if (add_val == 1 && vtop)
|
||||
else if (add_val == 1 && vtop
|
||||
&& (bl->biv_count == 0
|
||||
|| no_use_except_counting))
|
||||
{
|
||||
add_adjust = 0;
|
||||
cmp_code = NE;
|
||||
|
|
Loading…
Add table
Reference in a new issue