[PATCH] D30686: [SLP] PR32078: convert scalar operations to vector.

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 11:36:35 PST 2017


mkuper added a comment.

I haven't looked at the patch in detail yet, but I don't understand the rationale for putting it in the SLP vectorizer.
If transforming this pattern is a win, it's a win regardless of whether it originated in the SLP vectorizer, or just happened to appear in the IR.

Would this be something InstCombine could do? Or, if it's necessarily cost-dependent, then some later cleanup pass? Or DAGCombine?
If the reason you're not doing it in a later pass is because you don't have the cost model, then it may be a good idea to split out the change you have in https://reviews.llvm.org/D30649 into a utility, instead of having it live in the SLP vectorizer. We arleady have lib/Analysis/CostModel, but it doesn't really provide any useful interface.


https://reviews.llvm.org/D30686





More information about the llvm-commits mailing list