[PATCH] D24796: [SLPVectorizer] Fix for PR25748: reduction vectorization after loop unrolling.
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 2 00:57:04 PDT 2016
mkuper added a comment.
Hi Alexey,
Sorry for the slow response time, I'm intermittently on vacation.
> ABataev wrote in SLPVectorizer.cpp:1797
> It is required to handle the next kind of hor reduction:
>
> sum = a + b + c + ...
>
> It comes from:
>
> int test(unsigned int *p) {
> int sum = 0;
> for (int i = 0; i < 8; i++)
> sum += p[i];
> return sum;
> }
What I'm asking is, how do you even get trees of height 1?
> ABataev wrote in SLPVectorizer.cpp:4171
> Ok, will do it
The code below is really not entirely obvious (at least to me - admittedly, I'm not an expert on the SLP vectorizer...).
Could you actually update the comment to explain what it does - that is, why you have that specific set of conditions - instead of just removing it?
> ABataev wrote in SLPVectorizer.cpp:4586
> Michael,
> I'm working on a general patch, that is able to vectorize your example (I have it already but need some time to improve it). But this patch is still required as a first step for the second patch. Later we can rework this code for better compatibility
Ok, that sounds reasonable.
https://reviews.llvm.org/D24796
More information about the llvm-commits
mailing list