[PATCH] D23410: [SLP] Initialize VectorizedValue when gathering

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 10:37:23 PDT 2016


mssimpso created this revision.
mssimpso added reviewers: nadav, mzolotukhin, mkuper.
mssimpso added subscribers: llvm-commits, hans, mcrosier.
Herald added a subscriber: mzolotukhin.

We abort building vectorizable trees in some cases (e.g., if the maximum recursion depth is reached, if the region size is too large, etc.). If this happens for a reduction, we can be left with a root entry that needs to be gathered. For these cases, we need make sure we actually set VectorizedValue to the resulting vector.

This patch ensures we properly set VectorizedValue and it also ensures the insertelement sequence generated for the gathers is inserted at the correct location (after the last instruction in the bundle). Please let me know what you think.

Reference: https://llvm.org/bugs/show_bug.cgi?id=28330

https://reviews.llvm.org/D23410

Files:
  lib/Transforms/Vectorize/SLPVectorizer.cpp
  test/Transforms/SLPVectorizer/AArch64/gather-root.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23410.67704.patch
Type: text/x-patch
Size: 8435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160811/66b90875/attachment.bin>


More information about the llvm-commits mailing list