[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)
commit48593d7934709504d56b239af436accca871ac76
tree3087044322d76857eab91cdf9a3fe6e0d483a3dc
parent93f5d9f093314289187440921a3c73c92cf8bfd3
[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. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214707 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-128-v16.ll