This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
ClosedPublic

Authored by ABataev on Nov 29 2016, 9:11 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev updated this revision to Diff 79588.Nov 29 2016, 9:11 AM
ABataev retitled this revision from to [SLP] Fix for PR6246: vectorization for scalar ops on vector elements..
ABataev updated this object.
ABataev added reviewers: RKSimon, spatel, mkuper, hfinkel.
ABataev added a subscriber: llvm-commits.
hfinkel accepted this revision.Dec 1 2016, 7:13 AM
hfinkel edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 1 2016, 7:13 AM
This revision was automatically updated to reflect the committed changes.