diff options
author | Richard Biener <rguenther@suse.de> | 2018-01-31 13:07:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-01-31 13:07:53 +0000 |
commit | 957a25ab0c76a2beb268aad005804da41e136c37 (patch) | |
tree | d442cd53b63f1845e4293e36ab75ae5536aa9c27 /gcc/tree-data-ref.c | |
parent | 8ede319fa972ea06c54fe90deb88334b94401bcb (diff) | |
download | gcc-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.c | 5 |
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 |