[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),undef) -> bop(shuffle'(x,y),shuffle...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 19 Mar 2021 13:34:47 +0000 (13:34 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 19 Mar 2021 14:14:56 +0000 (14:14 +0000)
commitffb28871037105c899f63726953b6c4e7aa7b148
tree58c1cdc487646b36a4696e2accd1afd3bc12e27c
parent2ec9239a7b1faf880a130d6e5146883b48c85681
[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),undef) -> bop(shuffle'(x,y),shuffle'(z,w))

Followup to D96345, handle unary shuffles of binops (as well as binary shuffles) if we can merge the shuffle with inner operand shuffles.

Differential Revision: https://reviews.llvm.org/D98646
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/haddsub-4.ll
llvm/test/CodeGen/X86/haddsub-shuf.ll
llvm/test/CodeGen/X86/known-signbits-vector.ll