[x86] Just unilaterally prefer SSSE3-style PSHUFB lowerings over clever
authorChandler Carruth <chandlerc@gmail.com>
Mon, 4 Aug 2014 10:17:35 +0000 (10:17 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 4 Aug 2014 10:17:35 +0000 (10:17 +0000)
commit0e2ddb279085f9412c179b8ab4f4377c719db232
treea74a2df90525400bcb5c8fdca89966b64db2ae1c
parentc88a91fa751d78305dd208daa330eae24b3b1f5d
[x86] Just unilaterally prefer SSSE3-style PSHUFB lowerings over clever
use of PACKUS. It's cleaner that way.

I looked at implementing clever combine-based folding of PACKUS chains
into PSHUFB but it is quite hard and doesn't seem likely to be worth it.
The most annoying part would be detecting that the correct masking had
been done to use PACKUS-style instructions as a blend operation rather
than there being any saturating as is indicated by its name. We generate
really nice code for what few test cases I've come up with that aren't
completely contrived for this by just directly prefering PSHUFB and so
let's go with that strategy for now. =]

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