diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-15 05:04:40 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-15 05:04:40 +0000 |
commit | 328218c22e91d8cb590fdd6d2dcc4dbcd3d29a77 (patch) | |
tree | e1f9a3b7e60d6567d61591500be04952318f5d47 /gcc/tree-data-ref.c | |
parent | db990c65db9f947154ac8126013e25315c265790 (diff) | |
download | gcc-328218c22e91d8cb590fdd6d2dcc4dbcd3d29a77.tar.gz |
Fix PR46928: handle "A[p] == A[p]" in data dep analysis with p a parameter of the loop.
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46928
* tree-data-ref.c (analyze_overlapping_iterations): Handle "A[p] == A[p]"
in data dependence analysis with p a parameter of the loop.
* gcc.dg/tree-ssa/ldist-17.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 9a813702a6a..a6d07319000 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -2653,7 +2653,8 @@ analyze_overlapping_iterations (tree chrec_a, /* If they are the same chrec, and are affine, they overlap on every iteration. */ else if (eq_evolutions_p (chrec_a, chrec_b) - && evolution_function_is_affine_multivariate_p (chrec_a, lnn)) + && (evolution_function_is_affine_multivariate_p (chrec_a, lnn) + || operand_equal_p (chrec_a, chrec_b, 0))) { dependence_stats.num_same_subscript_function++; *overlap_iterations_a = conflict_fn (1, affine_fn_cst (integer_zero_node)); @@ -2662,7 +2663,7 @@ analyze_overlapping_iterations (tree chrec_a, } /* If they aren't the same, and aren't affine, we can't do anything - yet. */ + yet. */ else if ((chrec_contains_symbols (chrec_a) || chrec_contains_symbols (chrec_b)) && (!evolution_function_is_affine_multivariate_p (chrec_a, lnn) |