[X86][SSE] Match zero/any extension shuffles that don't start from the first element
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Sep 2015 08:16:08 +0000 (08:16 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Sep 2015 08:16:08 +0000 (08:16 +0000)
commitde8d7c41ca0f6faf525ad40f070a28e6822cd5a4
treeb0fe0c5324ede651ca631b9ac78c278a43fda08a
parent6522ad690908d837805bc4477772287d0cb76842
[X86][SSE] Match zero/any extension shuffles that don't start from the first element

This patch generalizes the lowering of shuffles as zero extensions to allow extensions that don't start from the first element. It now recognises extensions starting anywhere in the lower 128-bits or at the start of any higher 128-bit lane.

The motivation was to reduce the number of high cost pshufb calls, but it also improves the SSE2 case as well.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248250 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/machine-cp.ll
test/CodeGen/X86/vec_cast2.ll
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vector-sext.ll
test/CodeGen/X86/vector-shuffle-256-v16.ll
test/CodeGen/X86/vector-shuffle-256-v32.ll
test/CodeGen/X86/vector-shuffle-sse4a.ll
test/CodeGen/X86/vector-zext.ll