]> granicus.if.org Git - llvm/commit
[X86][SSE] Use PSLLDQ/PSRLDQ to mask out zeroable ends of a shuffle
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 1 Feb 2019 16:02:12 +0000 (16:02 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 1 Feb 2019 16:02:12 +0000 (16:02 +0000)
commit488b40bd2e114094b70317ebfe11f8c4d689d79f
tree30ad6619accf318424d3cdf91a6731246694698f
parente9dc79169d528635259dc0c1b0afa8c7e6eed1d7
[X86][SSE] Use PSLLDQ/PSRLDQ to mask out zeroable ends of a shuffle

As suggested on PR40318, this patch uses PSLLDQ/PSRLDQ to lower shuffles to zero out the ends of a vector, leaving a sequential inner section.

For pre-SSSE3 we do this for shuffles with zeros at either end (requiring up to 3 shifts), but once PSHUFB is available I've limited this to shuffles with a single zeroable end (2 shifts).

Differential Revision: https://reviews.llvm.org/D56784

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352883 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/buildvec-extract.ll
test/CodeGen/X86/vector-shuffle-128-v16.ll
test/CodeGen/X86/vector-shuffle-128-v8.ll
test/CodeGen/X86/vector-shuffle-sse4a.ll