[X86][SSE] shuffle(hop,hop) - canonicalize unary hop(x,x) shuffle masks
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 10 Aug 2020 15:01:00 +0000 (16:01 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 10 Aug 2020 15:09:27 +0000 (16:09 +0100)
commit9a368d2b0088a8b7209c4a435427dfe8ad62744f
tree7a1eddef01de4dbe39b1c6e02363dbdd3503ece4
parent90f721404ff84d904085687bcb58ae798b5d5209
[X86][SSE] shuffle(hop,hop) - canonicalize unary hop(x,x) shuffle masks

If a shuffle is referring to both the lower and upper half lanes of an unary horizontal op, then canonicalize the mask to only refer to the lower half.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/haddsub-undef.ll