[X86][SSE] pslldq/psrldq byte shifts/rotation for SSE2
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Nov 2014 10:06:49 +0000 (10:06 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Nov 2014 10:06:49 +0000 (10:06 +0000)
commita6943fff90e0656265f84ecbe83f3c05540c7b0a
tree0b43271aa4ea4089dc224a2deb25eb339a12a977
parentf47d325eec1cea83922c54a01811d136bb1b827a
[X86][SSE] pslldq/psrldq byte shifts/rotation for SSE2

This patch builds on http://reviews.llvm.org/D5598 to perform byte rotation shuffles (lowerVectorShuffleAsByteRotate) on pre-SSSE3 (palignr) targets - pre-SSSE3 is only enabled on i8 and i16 vector targets where it is a more definite performance gain.

I've also added a separate byte shift shuffle (lowerVectorShuffleAsByteShift) that makes use of the ability of the SLLDQ/SRLDQ instructions to implicitly shift in zero bytes to avoid the need to create a zero register if we had used palignr.

Differential Revision: http://reviews.llvm.org/D5699

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222340 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/palignr.ll
test/CodeGen/X86/sse3.ll
test/CodeGen/X86/vec_insert-5.ll
test/CodeGen/X86/vector-shuffle-128-v16.ll
test/CodeGen/X86/vector-shuffle-128-v8.ll