[PATCH] D31509: [InstCombine] Combine vector shuffles if the same operand can be reused

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 11:06:43 PDT 2017


efriedma added a comment.

There are very few passes which create vector shuffles in LLVM, besides the vectorizers, and the vectorizers should be aware of the cost of the shuffles they generate; I don't think there's a useful distinction to be found here.

Making InstCombine use TargetTransformInfo::getShuffleCost() or something like that is probably the right choice.  But please send an email to llvmdev so the maintainers of other targets see this.


https://reviews.llvm.org/D31509





More information about the llvm-commits mailing list