The next code is not vectorized by the SLPVectorizer:
int test(unsigned int *p) { int sum = 0; for (int i = 0; i < 8; i++) sum += p[i]; return sum; }
During optimization this loop is fully unrolled and SLPVectorizer is unable to vectorize it. Patch tries to fix this problem.
Why do you need this change?