summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-20 01:29:43 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-20 01:29:43 +0000
commite88bb3286d921153b834f4677dd0e7c7ec57f632 (patch)
treec81b2b6144d7b5c7ede0be2fbe0f15356a34c424 /gcc/tree-ssa-loop-niter.c
parent5ce7279733af9142174b11fcb4e8768bd3efe1b5 (diff)
downloadgcc-e88bb3286d921153b834f4677dd0e7c7ec57f632.tar.gz
* tree-ssa-loop-niter.c (assert_loop_rolls_lt): Convert the operands
of compare to the same type. * cfgloopmanip.c (add_loop): Update information about loop exits. (loop_version): Remove the innermost loop requirement. * tree-ssa-loop-manip.c (determine_exit_conditions): Convert bounds to sizetype for pointers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index e209f732a3b..fdce4be01d4 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -918,8 +918,9 @@ assert_loop_rolls_lt (tree type, affine_iv *iv0, affine_iv *iv1,
/* And then we can compute iv0->base - diff, and compare it with
iv1->base. */
- mbzl = fold_build2 (MINUS_EXPR, type1, iv0->base, diff);
- mbzr = iv1->base;
+ mbzl = fold_build2 (MINUS_EXPR, type1,
+ fold_convert (type1, iv0->base), diff);
+ mbzr = fold_convert (type1, iv1->base);
}
else
{
@@ -934,8 +935,9 @@ assert_loop_rolls_lt (tree type, affine_iv *iv0, affine_iv *iv1,
iv1->base, bound);
}
- mbzl = iv0->base;
- mbzr = fold_build2 (MINUS_EXPR, type1, iv1->base, diff);
+ mbzl = fold_convert (type1, iv0->base);
+ mbzr = fold_build2 (MINUS_EXPR, type1,
+ fold_convert (type1, iv1->base), diff);
}
if (!integer_nonzerop (assumption))