[PATCH] D27215: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 09:11:36 PST 2016
ABataev created this revision.
ABataev added reviewers: RKSimon, spatel, mkuper, hfinkel.
ABataev added a subscriber: llvm-commits.
Herald added a subscriber: mzolotukhin.
When trying to vectorize trees that start at insertelement instructions function tryToVectorizeList() uses vectorization factor calculated as MinVecRegSize/ScalarTypeSize. But sometimes it does not work as tree cost for this fixed vectorization factor is too high.
Patch tries to improve the situation. It tries different vectorization factors from max(PowerOf2Floor(NumberOfVectorizedValues), MinVecRegSize/ScalarTypeSize) to MinVecRegSize/ScalarTypeSize and tries to choose the best one.
https://reviews.llvm.org/D27215
Files:
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27215.79588.patch
Type: text/x-patch
Size: 23418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161129/b3bd7736/attachment.bin>
More information about the llvm-commits
mailing list