loop.c (strength_reduce): Compute number of iterations as unsigned HOST_WIDE_INT.

* loop.c (strength_reduce): Compute number of iterations as
        unsigned HOST_WIDE_INT.

From-SVN: r50550
This commit is contained in:
Richard Henderson 2002-03-10 15:46:14 -08:00 committed by Richard Henderson
parent 8d8a083e9c
commit 26b738be01
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2002-03-10 Richard Henderson <rth@redhat.com>
* loop.c (strength_reduce): Compute number of iterations as
unsigned HOST_WIDE_INT.
2002-03-10 Richard Henderson <rth@redhat.com> 2002-03-10 Richard Henderson <rth@redhat.com>
* sched-rgn.c (add_branch_dependences): Don't allow insns that throw * sched-rgn.c (add_branch_dependences): Don't allow insns that throw

View File

@ -5225,13 +5225,13 @@ strength_reduce (loop, flags)
/* In case number of iterations is known, drop branch prediction note /* In case number of iterations is known, drop branch prediction note
in the branch. Do that only in second loop pass, as loop unrolling in the branch. Do that only in second loop pass, as loop unrolling
may change the number of iterations performed. */ may change the number of iterations performed. */
if ((flags & LOOP_BCT) if (flags & LOOP_BCT)
&& loop_info->n_iterations / loop_info->unroll_number > 1)
{ {
int n = loop_info->n_iterations / loop_info->unroll_number; unsigned HOST_WIDE_INT n
predict_insn (PREV_INSN (loop->end), = loop_info->n_iterations / loop_info->unroll_number;
PRED_LOOP_ITERATIONS, if (n > 1)
REG_BR_PROB_BASE - REG_BR_PROB_BASE / n); predict_insn (PREV_INSN (loop->end), PRED_LOOP_ITERATIONS,
REG_BR_PROB_BASE - REG_BR_PROB_BASE / n);
} }
if (loop_dump_stream) if (loop_dump_stream)