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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Apart from the permute issue that's maybe there the issue of the segfault is
failure to code generate the loads correctly to match the SLP analysis.  We
generate loads as if we'd use a VF of 2 but use only the lower part but DCE /
simplification doesn't simplify

  _64 = MEM <vector(2) double> [(const double *)ivtmp_66];
  ivtmp_63 = ivtmp_66 + _75;
  _62 = MEM <vector(2) double> [(const double *)ivtmp_63];
  vect_cst__60 = {_64, _62};
  vect__4.12_59 = VEC_PERM_EXPR <vect_cst__60, vect_cst__60, { 1, 0, 1, 0 }>;

to, for example

  _64 = MEM <vector(2) double> [(const double *)ivtmp_66];
  ivtmp_63 = ivtmp_66 + _75;
  vect_cst__60 = {_64, _64};
  vect__4.12_59 = VEC_PERM_EXPR <vect_cst__60, vect_cst__60, { 1, 0, 1, 0 }>;

(we now also allow VEC_PERM of _64, _64 directly with GCC 13, but the targets
need to be ready for this)

That's probably a latent issue in other cases as well.  We'd either need to
disallow these kind of load permutations or make sure we only reference
the actually loaded DR group when filling the input vectors.

Reply via email to