[x86] Improve and correct how the new vector shuffle lowering was
authorChandler Carruth <chandlerc@gmail.com>
Wed, 1 Oct 2014 23:14:28 +0000 (23:14 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 1 Oct 2014 23:14:28 +0000 (23:14 +0000)
commit4bbf21e71e0b639353710fbbc4ee479cb7072364
treeeaeb9a8c3ea43fb2d68f75459d015ebf80a871e7
parent52c08fdb906cbdaa10cb5f46351ebc777debf292
[x86] Improve and correct how the new vector shuffle lowering was
matching and lowering 64-bit insertions.

The first problem was that we weren't looking through bitcasts to
discover that we *could* lower as insertions. Once fixed, we in turn
weren't looking through bitcasts to discover that we could fold a load
into the lowering. Once fixed, we weren't forming a SCALAR_TO_VECTOR
node around the inserted element and instead were passing a scalar to
a DAG node that expected a vector. It turns out there are some patterns
that will "lower" this into the correct asm, but the rest of the X86
backend is very unhappy with such antics.

This should fix a few more edge case regressions I've spotted going
through the regression test suite to enable the new vector shuffle
lowering.

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