This is an archive of the discontinued LLVM Phabricator instance.

[SLPVectorizer] Generalize vectorizeStores to support loads as well NFC.
AbandonedPublic

Authored by fhahn on Sep 12 2017, 5:24 AM.

Details

Summary

This is a preparation for D37737.

Diff Detail

Event Timeline

fhahn created this revision.Sep 12 2017, 5:24 AM

tests? benchmarks results?

Hi Florian,

I'm curious to know if you have a motivating example for this change. For a load-rooted tree (and since we build the trees bottom-up), I think the depth would always be 1. I'm surprised the cost model would find this to be profitable. The loaded values would probably need to be extracted before they are used. Also, does the order of vectorization matter with this patch? Say we currently vectorize a store-rooted tree ending in consecutive loads. Is it possible with this patch that we would vectorize the loads first and then no longer be able to vectorize the entire tree? And lastly, if you have a particular case in mind that you're trying to optimize, do you know if the DAG combiner's consecutive load/store optimizations are helpful?

fhahn added a comment.Oct 11 2017, 3:56 PM

sorry for not responding sooner. Thanks for the feedback. I am currently swamped in other work, but I hope I can revisit this patch soon!

fhahn abandoned this revision.Mar 22 2018, 10:50 AM

Not needed anymore, fixed by D36130