[x86] Implement more aggressive use of PACKUS chains for lowering common
authorChandler Carruth <chandlerc@gmail.com>
Mon, 4 Aug 2014 09:40:02 +0000 (09:40 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 4 Aug 2014 09:40:02 +0000 (09:40 +0000)
commit06e6f1cae2ea0ca409ab97d4355918000b6fb599
tree35d0b25ff4ef728e2af602381360eca4a4b925a5
parent610ba533d0f1f6ae876f4f439d8fd6f868c3b219
[x86] Implement more aggressive use of PACKUS chains for lowering common
patterns of v16i8 shuffles.

This implements one of the more important FIXMEs for the SSE2 support in
the new shuffle lowering. We now generate the optimal shuffle sequence
for truncate-derived shuffles which show up essentially everywhere.

Unfortunately, this exposes a weakness in other parts of the shuffle
logic -- we can no longer form PSHUFB here. I'll add the necessary
support for that and other things in a subsequent commit.

llvm-svn: 214702
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-shuffle-128-v16.ll