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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Eventually PR60276 is related for which I introduced STMT_VINFO_MIN_NEG_DIST
which is checked just by vectorizable_load (vectorizable_store didn't support
negative distances at the time).  One part says

  /* Invalidate assumptions made by dependence analysis when vectorization
     on the unrolled body effectively re-orders stmts.  */
  if (ncopies > 1
...

that suggests the issue is related given for outer loop vectorization we
unroll the inner loop.  It also suggests a testcase for the store case
with just inner loop vectorization might be possible.

I never liked this post-fact throwing away of the dependence analysis
result so a fix to dependence analysis should eventually also fix the
PR60276 issue, removing the need for STMT_VINFO_MIN_NEG_DIST.

The dependence checking loop over distance vectors just looks at the
distance for the outer loop.

Reply via email to