loop-iv.c (iv_number_of_iterations): Fix overflow check for loops that count down.

2005-08-31  Dale Johannesen  <dalej@apple.com>

        * loop-iv.c (iv_number_of_iterations):  Fix overflow check for
        loops that count down.

From-SVN: r103689
This commit is contained in:
Dale Johannesen 2005-08-31 17:25:36 +00:00 committed by Dale Johannesen
parent 9c70f61046
commit c9eb80971d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-08-31 Dale Johannesen <dalej@apple.com>
* loop-iv.c (iv_number_of_iterations): Fix overflow check for
loops that count down.
2005-08-31 Richard Henderson <rth@redhat.com>
PR rtl-opt/23601

View File

@ -2417,7 +2417,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
tmp0 = lowpart_subreg (mode, iv0.base, comp_mode);
tmp1 = lowpart_subreg (mode, iv1.base, comp_mode);
bound = simplify_gen_binary (MINUS, mode, mode_mmin,
bound = simplify_gen_binary (PLUS, mode, mode_mmin,
lowpart_subreg (mode, step, comp_mode));
if (step_is_pow2)
{