diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-10 23:46:14 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-10 23:46:14 +0000 |
commit | 3864028d640685fb1471040ae230dcfbc117efbf (patch) | |
tree | 2fbb3d0587a9cec6f404c15cbbf3d81173a818c1 /gcc/loop.c | |
parent | cbaab9a304e62d2931cc110d2f95c533dec912ce (diff) | |
download | gcc-3864028d640685fb1471040ae230dcfbc117efbf.tar.gz |
* loop.c (strength_reduce): Compute number of iterations as
unsigned HOST_WIDE_INT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50550 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index 506984beaaf..3108b032498 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -5225,13 +5225,13 @@ strength_reduce (loop, flags) /* In case number of iterations is known, drop branch prediction note in the branch. Do that only in second loop pass, as loop unrolling may change the number of iterations performed. */ - if ((flags & LOOP_BCT) - && loop_info->n_iterations / loop_info->unroll_number > 1) + if (flags & LOOP_BCT) { - int n = loop_info->n_iterations / loop_info->unroll_number; - predict_insn (PREV_INSN (loop->end), - PRED_LOOP_ITERATIONS, - REG_BR_PROB_BASE - REG_BR_PROB_BASE / n); + unsigned HOST_WIDE_INT n + = loop_info->n_iterations / loop_info->unroll_number; + if (n > 1) + predict_insn (PREV_INSN (loop->end), PRED_LOOP_ITERATIONS, + REG_BR_PROB_BASE - REG_BR_PROB_BASE / n); } if (loop_dump_stream) |