[x86] Teach the new vector shuffle lowering to widen floating point
authorChandler Carruth <chandlerc@gmail.com>
Thu, 2 Oct 2014 21:37:14 +0000 (21:37 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 2 Oct 2014 21:37:14 +0000 (21:37 +0000)
commitbf21d40070d18a82b3f0af0c05dc3d7e33b11f3a
tree1902ac183f3a962a8ec12cffade5c094b43cf479
parentb417a35b5b33bfe9f427efbe6a76289cb4e4d5b2
[x86] Teach the new vector shuffle lowering to widen floating point
elements as well as integer elements in order to form simpler shuffle
patterns.

This is the primary reason why we were failing to match some of the
2-and-2 floating point shuffles such as PR21140. Even after fixing this
we need to support some extra patterns in the backend in order to match
the resulting X86ISD::UNPCKL nodes into the correct instructions. This
commit should fix PR21140 and includes more comprehensive testing of
insertion patterns in v4 shuffles.

Not all of the added tests are beautiful. For example, we don't have
clever instructions to insert-via-load in the integer domain. There are
also some places where we aren't sufficiently cunning with our use of
movq and movd, but that's future work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218911 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/vector-shuffle-128-v4.ll
test/CodeGen/X86/vector-shuffle-256-v8.ll