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

Keno Fischer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 17:26:34 PDT 2017


loladiro added a comment.

If a TTI hook is not the right way to go here, maybe we can find a way to actually express what we want here, maybe via metadata or some other specification on shufflevector that would tell the optimizer not to touch the shufflemask unless it's confident it can improve upon it. As it is, I see my CPU with a perfectly good shuffle instruction shuffle the same vector three times, because LLVM refuses to combine these shuffles - pretty embarrassing ;).


https://reviews.llvm.org/D31509





More information about the llvm-commits mailing list