OSDN Git Service

[X86][SSE] Enable target shuffle combining to combine multiple shuffle inputs.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 3 Aug 2016 19:08:24 +0000 (19:08 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 3 Aug 2016 19:08:24 +0000 (19:08 +0000)
commit9b6e2452c34fe3e93eff9bc50bfe6d87b2dcb5af
treec8d6303314d3fd402541f99df4faa9bc34d149ef
parente5d157859c3cad39d7eccd9dc6104f255d3bdcc2
[X86][SSE] Enable target shuffle combining to combine multiple shuffle inputs.

We currently only support combining target shuffles that consist of a single source input (plus elements known to be undef/zero).

This patch generalizes the recursive combining of the target shuffle to collect all the inputs, merging any duplicates along the way, into a full set of src ops and its shuffle mask.

We uncover a number of cases where we have failed to combine a unary shuffle because the input has been duplicated and separated during lowering.

This will allow us to combine to 2-input shuffles in a future patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277631 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx512-build-vector.ll
test/CodeGen/X86/clear_upper_vector_element_bits.ll
test/CodeGen/X86/vector-shuffle-256-v16.ll
test/CodeGen/X86/vector-shuffle-256-v32.ll
test/CodeGen/X86/vector-shuffle-combining.ll