aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-09-19 06:55:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-09-19 06:55:17 +0000
commitae5276392fb59dbdec56dd8cc6cc8253d9334c8b (patch)
tree92c04dc20ae233a40fcee15fb98698f932e77acc /gcc/tree-data-ref.c
parented4fd957296b0633d21996a9c4cd5a5f3a2ee2ba (diff)
downloadgcc-ae5276392fb59dbdec56dd8cc6cc8253d9334c8b.zip
gcc-ae5276392fb59dbdec56dd8cc6cc8253d9334c8b.tar.gz
gcc-ae5276392fb59dbdec56dd8cc6cc8253d9334c8b.tar.bz2
re PR tree-optimization/77605 (wrong code at -O3 on x86_64-linux-gnu)
2016-09-19 Richard Biener <rguenther@suse.de> PR middle-end/77605 * tree-data-ref.c (analyze_subscript_affine_affine): Use the proper niter to bound the loops. * gcc.dg/torture/pr77605.c: New testcase. From-SVN: r240227
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 58da248..8152da3 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -2686,13 +2686,13 @@ analyze_subscript_affine_affine (tree chrec_a,
if (niter > 0)
{
- HOST_WIDE_INT tau2 = MIN (FLOOR_DIV (niter - i0, i1),
- FLOOR_DIV (niter - j0, j1));
+ HOST_WIDE_INT tau2 = MIN (FLOOR_DIV (niter_a - i0, i1),
+ FLOOR_DIV (niter_b - j0, j1));
HOST_WIDE_INT last_conflict = tau2 - (x1 - i0)/i1;
/* If the overlap occurs outside of the bounds of the
loop, there is no dependence. */
- if (x1 >= niter || y1 >= niter)
+ if (x1 >= niter_a || y1 >= niter_b)
{
*overlaps_a = conflict_fn_no_dependence ();
*overlaps_b = conflict_fn_no_dependence ();