aboutsummaryrefslogtreecommitdiff
path: root/gcc/sese.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-10-09 13:50:10 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-10-09 13:50:10 +0000
commit7668b0a65616dec614379a396186f3a03e329965 (patch)
treeb0e28952a26e671e7b03d21e4f1a5d6f733c76ce /gcc/sese.c
parent14108eda7ee4aaaa4840be8728b3161f8c7bd364 (diff)
downloadgcc-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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/sese.c b/gcc/sese.c
index b3bf611..d6702ad 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -444,14 +444,13 @@ scev_analyzable_p (tree def, sese_l &region)
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