https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63271
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- The closest we currently handle (with -O3) is: typedef int vec __attribute__((vector_size(4*sizeof(int)))); void f(vec*r, int i){ (*r)[0]=3*i; (*r)[1]=4*i; (*r)[2]=7*i; (*r)[3]=9*i; } (none of the constants should be 0, 1 or -1, those hide the multiplication and we don't see through that) I did have in mind recognizing, with a forwprop-like pattern matching, a constructor { sqrt(x1), ..., sqrt(xn) } since we don't have any generic syntax to call sqrt on a vector. Binary operations are a bit more work. I don't know if it would be possible / a good idea to tell SLP that a constructor is essentially the same as several data refs, to avoid duplicating too much code.