https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90021

--- Comment #2 from bin cheng <amker at gcc dot gnu.org> ---
We have {{0, +, 1}_6, +, 1}_4 in this case, and _6 is an outer loop of
loop_nest.  Function add_multivariate_self_dist was intentionally skipped in
PR89725 patch, but control flow gets to it because
  1) In analyze_miv_subscript, equal access_fn case is specially handled,
rather than general miv analysis.
  2) In add_other_self_distances, evolution_function_is_univariate_p returns
false for above access_fn.

It looks we can also introduce another parameter loopnum to
evolution_function_is_univariate_p, just like
evolution_function_is_affine_multivariate_p to consider outer loop's chrec as
invariant symbol here.  OTOH, making changes in add_multivariate_self_dist
still doesn't seem right in this case.

Reply via email to