[PATCH] Fix PR19657 : SLP vectorization doesn't combine scalar load to vector loads

Raul Silvera rsilvera at google.com
Fri May 23 11:00:36 PDT 2014


I agree this is an improvement, but this approach is still failing to catch
cases where the common uses are not on separate paths on the tree. In those
cases no matter which order we take there will be a common use that can't
be scheduled.

Here is a sample case where we still fail to schedule a common load:

void foo(double *x, double C) {
>  x[0] = x[0]*C + x[0] * x[0];
>  x[1] = x[1]*C + x[1] * x[1];
> }

Any ideas on how to get those cases? It would seem to me we'd need either a
prepass or deferral of the decisions until the whole tree is inspected.
Thoughts?

Raúl E Silvera | SWE | rsilvera at google.com | *408-789-2846*

http://reviews.llvm.org/D3800






More information about the llvm-commits mailing list