diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-07-20 03:29:43 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-07-20 01:29:43 +0000 |
commit | d24a32a1860b9d5a23ccca40cc70d165cd285e8b (patch) | |
tree | c81b2b6144d7b5c7ede0be2fbe0f15356a34c424 /gcc/tree-ssa-loop-manip.c | |
parent | 9143267b2119f7cded46e34402ec37665a9f045a (diff) | |
download | gcc-d24a32a1860b9d5a23ccca40cc70d165cd285e8b.tar.gz |
tree-ssa-loop-niter.c (assert_loop_rolls_lt): Convert the operands of compare to the same type.
* 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.
From-SVN: r126796
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; |