https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89725
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Mon Apr 8 11:52:18 2019 New Revision: 270203 URL: https://gcc.gnu.org/viewcvs?rev=270203&root=gcc&view=rev Log: 2019-04-01 Bin Cheng <bin.ch...@linux.alibaba.com> PR tree-optimization/89725 * tree-chrec.c (chrec_contains_symbols): New parameter. Handle outer loop's chrec as invariant symbol. * tree-chrec.h (chrec_contains_symbols): New parameter. * tree-data-ref.c (analyze_miv_subscript): Pass new argument. (build_classic_dist_vector_1, add_other_self_distances): Bypass access function of loops not in DDR's loop_nest. * tree-data-ref.h (index_in_loop_nest): Add unreachable check. * gcc.dg/tree-ssa/pr89725.c: New test. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/pr89725.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-chrec.c trunk/gcc/tree-chrec.h trunk/gcc/tree-data-ref.c trunk/gcc/tree-data-ref.h