[PATCH] D31509: [InstCombine] Combine vector shuffles if the same operand can be reused
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 09:51:51 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D31509#715407, @loladiro wrote:
> The corresponding discussion for the original patch was on llvm-commits: http://marc.info/?t=136735490000006&r=1&w=2
Ah, thanks - somehow didn't see that in the search results. So one of the primary objections was x86 transpose:
https://software.intel.com/en-us/articles/3d-vector-normalization-using-256-bit-intel-advanced-vector-extensions-intel-avx
4 years later, we're still living in fear of arbitrary shuffle masks, but x86 has added tons of logic to produce good shuffles for every possible SSE/AVX variant. It would be interesting to see if this patch has any effect on those cases now.
That discussion also suggested canonicalizing shuffles to selects, but we did the opposite:
https://reviews.llvm.org/D24279
...because we're confident enough now that the backend can deal with that specialized (non-lane-crossing blend) form of shuffle.
https://reviews.llvm.org/D31509
More information about the llvm-commits
mailing list