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

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 13:15:34 PDT 2016


mssimpso added inline comments.


> mkuper wrote in SLPVectorizer.cpp:1797
> What I'm asking is, how do you even get trees of height 1?

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.

https://reviews.llvm.org/D24796





More information about the llvm-commits mailing list