[X86][SSE] Replace combineShuffleWithHorizOp with canonicalizeShuffleMaskWithHorizOp
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 16 Aug 2020 11:26:09 +0000 (12:26 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 16 Aug 2020 11:26:27 +0000 (12:26 +0100)
commitdca7eb7d602e7eac667c6d9de5e8f2b0845b9557
tree2fc928e7f395ae5dd1277cd57d5993eaa43b0cb1
parent44613bbec88be9e86b8c52c4f40bb1b1ab48d84c
[X86][SSE] Replace combineShuffleWithHorizOp with canonicalizeShuffleMaskWithHorizOp

Instead of just attempting to fold shuffle(HOP,HOP) for a specific target shuffle, make this part of combineX86ShufflesRecursively so we can perform this on the combined shuffle chain, which is particularly useful for recognising more cases of where we're performing multiple HOPs that can be merged and pre-AVX where we don't have good blend/unary target shuffle support.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/haddsub-shuf.ll
llvm/test/CodeGen/X86/haddsub-undef.ll
llvm/test/CodeGen/X86/phaddsub.ll