From 57e3f39a03f36b17be20342c52046ec2747949ab Mon Sep 17 00:00:00 2001 From: rakdver Date: Wed, 24 May 2006 22:55:15 +0000 Subject: PR tree-optimization/27639 PR tree-optimization/26719 * tree-vrp.c (adjust_range_with_scev): Use scev_direction and adjust call to scev_probably_wraps_p. * tree-ssa-loop-niter.c (compare_trees, convert_step_widening, used_in_pointer_arithmetic_p, convert_step): Removed. (nowrap_type_p): New function. (scev_probably_wraps_p): Rewritten. * tree-scalar-evolution.c (instantiate_parameters_1): Do not call chrec_convert if chrec_convert_aggressive might have been used. * tree-chrec.c (convert_affine_scev, chrec_convert_1, scev_direction): New functions. (chrec_convert): Changed to a wrapper over chrec_convert_1. * tree-ssa-loop-ivopts.c (idx_find_step): Use convert_affine_scev instead of convert_step. * tree-flow.h (scev_probably_wraps_p): Declaration changed. (convert_step): Declaration removed. (convert_affine_scev, nowrap_type_p, scev_direction): Declare. * gcc.dg/pr27639.c: New test. * gcc.dg/pr26719.c: New test. * gcc.dg/tree-ssa/scev-cast.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114057 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-loop-ivopts.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'gcc/tree-ssa-loop-ivopts.c') diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 9a289cc6f4f..2bb2f0621b7 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1338,7 +1338,7 @@ idx_find_step (tree base, tree *idx, void *data) { struct ifs_ivopts_data *dta = data; struct iv *iv; - tree step, iv_step, lbound, off; + tree step, iv_base, iv_step, lbound, off; struct loop *loop = dta->ivopts_data->current_loop; if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF @@ -1394,12 +1394,11 @@ idx_find_step (tree base, tree *idx, void *data) /* The step for pointer arithmetics already is 1 byte. */ step = build_int_cst (sizetype, 1); - /* FIXME: convert_step should not be used outside chrec_convert: fix - this by calling chrec_convert. */ - iv_step = convert_step (dta->ivopts_data->current_loop, - sizetype, iv->base, iv->step, dta->stmt); - - if (!iv_step) + iv_base = iv->base; + iv_step = iv->step; + if (!convert_affine_scev (dta->ivopts_data->current_loop, + sizetype, &iv_base, &iv_step, dta->stmt, + false)) { /* The index might wrap. */ return false; -- cgit v1.2.1