diff options
author | Richard Biener <rguenther@suse.de> | 2017-10-09 13:50:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-10-09 13:50:10 +0000 |
commit | 7668b0a65616dec614379a396186f3a03e329965 (patch) | |
tree | b0e28952a26e671e7b03d21e4f1a5d6f733c76ce /gcc/tree-chrec.c | |
parent | 14108eda7ee4aaaa4840be8728b3161f8c7bd364 (diff) |
re PR tree-optimization/82449 (code-gen error in get_rename_from_scev)
2017-10-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/82449
* sese.c (scev_analyzable_p): Check whether the SCEV is linear.
* tree-chrec.h (evolution_function_is_constant_p): Adjust to
allow constant addresses.
* tree-chrec.c (scev_is_linear_expression): Constant evolutions
are linear.
* gfortran.dg/graphite/pr82449.f: New testcase.
From-SVN: r253546
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 66d3a7bd370..3867072566e 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -1610,6 +1610,9 @@ operator_is_linear (tree scev) bool scev_is_linear_expression (tree scev) { + if (evolution_function_is_constant_p (scev)) + return true; + if (scev == NULL || !operator_is_linear (scev)) return false; |