[SLPVectorizer] Relax "alternate" opcode vectorisation to work with any SK_Select...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 20 Jun 2018 14:26:28 +0000 (14:26 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 20 Jun 2018 14:26:28 +0000 (14:26 +0000)
commit2e2f20a94926606269626a405c0fba54cf0f7ed1
treeae8a718565e8238f499cc1ab3326d9545d33f63d
parent0c57de4c214a2b61811e247365a830cb70683a82
[SLPVectorizer] Relax "alternate" opcode vectorisation to work with any SK_Select shuffle pattern

D47985 saw the old SK_Alternate 'alternating' shuffle mask replaced with the SK_Select mask which accepts either input operand for each lane, equivalent to a vector select with a constant condition operand.

This patch updates SLPVectorizer to make full use of this SK_Select shuffle pattern by removing the 'isOdd()' limitation.

The AArch64 regression will be fixed by D48172.

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

llvm-svn: 335130
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll
llvm/test/Transforms/SLPVectorizer/X86/addsub.ll