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.
Details
Details
- Reviewers
spatel RKSimon mkuper hfinkel - Commits
- rG4f0d469d45a0: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
rGe8e94a717659: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
rG2c01af590457: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
rL289043: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
rL288497: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
rL288412: [SLP] Fix for PR6246: vectorization for scalar ops on vector elements.
Diff Detail
Diff Detail