OSDN Git Service

[X86][SSE] Avoid duplicate shuffle input sources in combineX86ShufflesRecursively
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 14 Aug 2018 17:22:37 +0000 (17:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 14 Aug 2018 17:22:37 +0000 (17:22 +0000)
commita06c0f8edb710e606f914e4e4fe22cd30b5ff5fb
treeb7c0abc98b008c46cc03cd3437ff38fc1bf0ef30
parentdd11fa16f91a102fbadf913d7fc8f9a087780994
[X86][SSE] Avoid duplicate shuffle input sources in combineX86ShufflesRecursively

rL339686 added the case where a faux shuffle might have repeated shuffle inputs coming from either side of the OR().

This patch improves the insertion of the inputs into the source ops lists to account for this, as well as making it trivial to add support for shuffles with more than 2 inputs in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339696 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-combining-avx2.ll
test/CodeGen/X86/vector-shuffle-combining-ssse3.ll