diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-20 01:29:43 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-20 01:29:43 +0000 |
commit | e88bb3286d921153b834f4677dd0e7c7ec57f632 (patch) | |
tree | c81b2b6144d7b5c7ede0be2fbe0f15356a34c424 /gcc/tree-ssa-loop-manip.c | |
parent | 5ce7279733af9142174b11fcb4e8768bd3efe1b5 (diff) | |
download | gcc-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-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 3354fdea6df..35bf97895b5 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -670,13 +670,17 @@ determine_exit_conditions (struct loop *loop, struct tree_niter_desc *desc, tree base = desc->control.base; tree step = desc->control.step; tree bound = desc->bound; - tree type = TREE_TYPE (base); + tree type = TREE_TYPE (step); tree bigstep, delta; tree min = lower_bound_in_type (type, type); tree max = upper_bound_in_type (type, type); enum tree_code cmp = desc->cmp; tree cond = boolean_true_node, assum; + /* For pointers, do the arithmetics in the type of step (sizetype). */ + base = fold_convert (type, base); + bound = fold_convert (type, bound); + *enter_cond = boolean_false_node; *exit_base = NULL_TREE; *exit_step = NULL_TREE; |