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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 00:04:42 PDT 2017


jonpa added a comment.

I had problems with vector shuffles on SystemZ which has partly come back recently. I first reported this on: https://bugs.llvm.org//show_bug.cgi?id=30630. The advice then (last year) was that this should be handled by InstCombiner. This makes sense to me as it is a way of simplifying the vectorizer algorithms. I wonder if this is still the general advice, or if the backend is supposed to handle this during DAGCombining, per discussion above?

I put my patch for InstCombiner at https://reviews.llvm.org/D31927. Note that it is not in perfect shape (that's why I never shared it), but it does some good things currently for SystemZ at least. It would be nice if anyone would try it and see if it helps... If so, we could perhaps make something out of it.

Comparing to last year, I see that there is a smaller problem with shuffles today. It also seems they may have gotten worse recently. Does anybody know what the causes might be here?


https://reviews.llvm.org/D31509





More information about the llvm-commits mailing list