[X86][AVX] canonicalizeShuffleMaskWithHorizOp - improve support for 256/512-bit vectors
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 12 May 2021 11:02:06 +0000 (12:02 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 12 May 2021 11:13:24 +0000 (12:13 +0100)
commit72e242a286be1c821c521fdc8a778517b193a59e
treea6d1708f5cc453450648f01df37451eca226993b
parent81900dc4982dc03da859a75c927e1bba95837c30
[X86][AVX] canonicalizeShuffleMaskWithHorizOp - improve support for 256/512-bit vectors

Extend the HOP(HOP(X,Y),HOP(Z,W)) and SHUFFLE(HOP(X,Y),HOP(Z,W)) folds to handle repeating 256/512-bit vector cases.

This allows us to drop the UNPACK(HOP(),HOP()) custom fold in combineTargetShuffle.

This required isRepeatedTargetShuffleMask to be tweaked to support target shuffle masks taking more than 2 inputs.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/horizontal-shuffle.ll