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/sese.c | |
parent | 14108eda7ee4aaaa4840be8728b3161f8c7bd364 (diff) | |
download | gcc-7668b0a65616dec614379a396186f3a03e329965.zip gcc-7668b0a65616dec614379a396186f3a03e329965.tar.gz gcc-7668b0a65616dec614379a396186f3a03e329965.tar.bz2 |
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/sese.c')
-rw-r--r-- | gcc/sese.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -444,14 +444,13 @@ scev_analyzable_p (tree def, sese_l ®ion) loop = loop_containing_stmt (SSA_NAME_DEF_STMT (def)); scev = scalar_evolution_in_region (region, loop, def); - return !chrec_contains_undetermined (scev) - && (TREE_CODE (scev) != SSA_NAME - || !defined_in_sese_p (scev, region)) - && (tree_does_not_contain_chrecs (scev) - || evolution_function_is_affine_p (scev)) - && (! loop - || ! loop_in_sese_p (loop, region) - || ! chrec_contains_symbols_defined_in_loop (scev, loop->num)); + return (!chrec_contains_undetermined (scev) + && (TREE_CODE (scev) != SSA_NAME + || !defined_in_sese_p (scev, region)) + && scev_is_linear_expression (scev) + && (! loop + || ! loop_in_sese_p (loop, region) + || ! chrec_contains_symbols_defined_in_loop (scev, loop->num))); } /* Returns the scalar evolution of T in REGION. Every variable that |