aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-01-31 13:07:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-01-31 13:07:53 +0000
commit957a25ab0c76a2beb268aad005804da41e136c37 (patch)
treed442cd53b63f1845e4293e36ab75ae5536aa9c27 /gcc/tree-data-ref.c
parent8ede319fa972ea06c54fe90deb88334b94401bcb (diff)
downloadgcc-957a25ab0c76a2beb268aad005804da41e136c37.zip
gcc-957a25ab0c76a2beb268aad005804da41e136c37.tar.gz
gcc-957a25ab0c76a2beb268aad005804da41e136c37.tar.bz2
re PR tree-optimization/84132 (tree-data-ref.c:3938: poor coding ?)
2018-01-31 Richard Biener <rguenther@suse.de> PR tree-optimization/84132 * tree-data-ref.c (analyze_miv_subscript): Properly check whether evolution_function_is_affine_multivariate_p before calling gcd_of_steps_may_divide_p. * g++.dg/torture/pr84132.C: New testcase. From-SVN: r257232
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index e39067d..0b6ad5f 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -3976,9 +3976,8 @@ analyze_miv_subscript (tree chrec_a,
}
else if (evolution_function_is_constant_p (difference)
- /* For the moment, the following is verified:
- evolution_function_is_affine_multivariate_p (chrec_a,
- loop_nest->num) */
+ && evolution_function_is_affine_multivariate_p (chrec_a,
+ loop_nest->num)
&& !gcd_of_steps_may_divide_p (chrec_a, difference))
{
/* testsuite/.../ssa-chrec-33.c