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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The particular example cannot improve from the matches[] improvements from
vect_build_slp_tree_1 alone since it is vect_get_and_check_slp_defs
which demotes { p[0], p[1], 1., 1. } to external.

The following is an example showing where the vect_build_slp_tree_1
can help:

double x[4];

void foo (double *p)
{
  int tem0 = x[0];
  int tem1 = x[1];
  int tem2 = x[2];
  int tem3 = x[3];
  tem0 = tem0 + (p[0] + 1.);
  tem1 = tem1 + (p[1] + 1.);
  tem2 = tem2 + (p[0] * 3.);
  tem3 = tem3 + (p[1] * 3.);
  x[0] = tem0;
  x[1] = tem1;
  x[2] = tem2;
  x[3] = tem3;
}

Reply via email to