This is a preparation for D37737.
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?