diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-21 23:13:00 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-21 23:13:00 +0000 |
commit | fa5e5a2f0706ca8e51dcdce30e7addade71bf3fd (patch) | |
tree | d94b5ef5e17a03628d716a1445a4b91366182b82 /gcc/lambda-code.c | |
parent | c0770282470be30c1aa3b581d7d80b570edc9b29 (diff) | |
download | gcc-fa5e5a2f0706ca8e51dcdce30e7addade71bf3fd.tar.gz |
2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/36286
PR tree-optimization/36287
* lambda-code.c (build_access_matrix): Do not use the loop->num
for computing the number of induction variables: use the loop depth
instead.
* testsuite/gcc.dg/tree-ssa/pr36287.c: New.
* testsuite/gfortran.dg/pr36286.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135741 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r-- | gcc/lambda-code.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 707591154e1..5ae74ffa1ce 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -2794,12 +2794,13 @@ build_access_matrix (data_reference_p data_reference, struct access_matrix *am = GGC_NEW (struct access_matrix); unsigned i, ndim = DR_NUM_DIMENSIONS (data_reference); struct loop *loop = bb_for_stmt (DR_STMT (data_reference))->loop_father; - unsigned nb_induction_vars = loop_depth (loop) - loop_nest_num + 1; + struct loop *loop_nest = get_loop (loop_nest_num); + unsigned nivs = loop_depth (loop) - loop_depth (loop_nest) + 1; unsigned lambda_nb_columns; lambda_vector_vec_p matrix; AM_LOOP_NEST_NUM (am) = loop_nest_num; - AM_NB_INDUCTION_VARS (am) = nb_induction_vars; + AM_NB_INDUCTION_VARS (am) = nivs; AM_PARAMETERS (am) = parameters; lambda_nb_columns = AM_NB_COLUMNS (am); |