diff options
author | Dale Johannesen <dalej@apple.com> | 2005-08-31 17:25:36 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@gcc.gnu.org> | 2005-08-31 17:25:36 +0000 |
commit | c9eb80971df6cbbca67c1cb561b0ccbc8bb5f722 (patch) | |
tree | 7d06abad9fae4d070663e319140ad86a839b5874 /gcc/loop-iv.c | |
parent | 9c70f610465a6e904a1b9c0fdc39439629b392c7 (diff) | |
download | gcc-c9eb80971df6cbbca67c1cb561b0ccbc8bb5f722.zip gcc-c9eb80971df6cbbca67c1cb561b0ccbc8bb5f722.tar.gz gcc-c9eb80971df6cbbca67c1cb561b0ccbc8bb5f722.tar.bz2 |
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
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r-- | gcc/loop-iv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 7c7a5de..8e915a0 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -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) { |