[PATCH] D24796: [SLPVectorizer] Fix for PR25748: reduction vectorization after loop unrolling.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 04:44:17 PDT 2016


ABataev added inline comments.


> mssimpso wrote in SLPVectorizer.cpp:1797
> I could be wrong about this, but I think the horizontal reduction matching logic looks through the actual reduction step, since it will generate customized vector operations for the reduce. So it will build trees starting from the reduction operands, not the reduced value. Looking at the test case, this means the adds won't be in the tree. Only the loads will be, so the height will be one.

Yes, that's right

> mkuper wrote in SLPVectorizer.cpp:4171
> 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?

Ok

https://reviews.llvm.org/D24796





More information about the llvm-commits mailing list