[x86] Add handling for splat-like widenings of v16i8 shuffles.
authorChandler Carruth <chandlerc@gmail.com>
Sat, 28 Jun 2014 05:16:40 +0000 (05:16 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 28 Jun 2014 05:16:40 +0000 (05:16 +0000)
commitfe05f61e5d4325dd354f686bd1a2f4f17527dbfb
treef480285d95df56995a334c689fa51e251f923b7b
parentbe56f1605298fab52f9e1e63aee7b64c01479172
[x86] Add handling for splat-like widenings of v16i8 shuffles.

These show up really frequently, not the least with actual splats. =] We
lowered these quite badly before. The new code path tries to widen i8
shuffles to i16 shuffles in a splat-like way. There are still some
inefficiencies in our i16 splat logic though, so we aren't really done
here.

Also, for certain patterns (bit of a gather-and-splat) we still
generate pretty silly code, and I've left a fixme for addressing it.
However, I'm not actually worried about this code pattern as much. The
old shuffle lowering generates a 29 instruction monstrosity for it that
should execute much more slowly.

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