summaryrefslogtreecommitdiff
path: root/gcc/loop-iv.c
diff options
context:
space:
mode:
authordalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-31 17:25:36 +0000
committerdalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-31 17:25:36 +0000
commit58379c862cb7abec28dfea4263b2c9bc70a1c631 (patch)
tree7d06abad9fae4d070663e319140ad86a839b5874 /gcc/loop-iv.c
parenta2442f84f375aa83c12c76ad7f7a963e59b1124d (diff)
downloadgcc-58379c862cb7abec28dfea4263b2c9bc70a1c631.tar.gz
2005-08-31 Dale Johannesen <dalej@apple.com>
* loop-iv.c (iv_number_of_iterations): Fix overflow check for loops that count down. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r--gcc/loop-iv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 7c7a5de0a55..8e915a04b23 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)
{