[PATCH] D14829: [SLP] Vectorize gather-like idioms ending at non-consecutive loads.

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 14:38:35 PST 2015


anemet added a comment.

In http://reviews.llvm.org/D14829#308530, @nadav wrote:

> @anemet In SelectionDAG we can use the memory order chains, and don't have to scan the whole basic block for loads/stores. This is very efficient, and is already used by the load-store merger in SelectionDAG.


But the SLP vectorizer already scans for stores in the entire function so piggybacking on that for loads seems to make sense.

Are you worried about scanning for loads or matching up the "related ones" into the initial bundle?  I could see the latter being problematic but I am not sure how the memory order chain could help with that.  At the bottom of these chains we have non-consecutive loads (a[b[0] - c[0]],  a[b[1] - c[1]], ...).  At the top, we have consecutive loads but those should be on independent chains.


http://reviews.llvm.org/D14829





More information about the llvm-commits mailing list