[X86] Attempt to combine binary shuffles where both operands come from the same large...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 13 Oct 2022 13:34:01 +0000 (14:34 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 13 Oct 2022 13:34:11 +0000 (14:34 +0100)
commitfa9c12ed964b8201e142d78e430ad4c76bd7af62
treee0e31d237764ec1454b029d8850a103fd61b9261
parent32cb683d2d3aa9c8fe0f8b24bd3ad1a5ea53bdcc
[X86] Attempt to combine binary shuffles where both operands come from the same larger vector

Allows us to use combineX86ShuffleChainWithExtract to combine targetshuffle(low_subvector(x),high_subvector(x)) -> low_subvector(targetshuffle(x)) style patterns

This is currently very limited (it must have a v2i64/v2f64 result), but while triaging I noticed we might be able to extend this to allow more types for targets with suitable variable cross lane shuffle support.

Fixes #58339
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-shuffles/partial_permute.ll
llvm/test/CodeGen/X86/vector-shuffle-512-v8.ll
llvm/test/CodeGen/X86/vector-shuffle-combining-avx2.ll
llvm/test/CodeGen/X86/vector-shuffle-combining.ll