[x86] Significantly improve the ability of the new vector shuffle
authorChandler Carruth <chandlerc@gmail.com>
Fri, 3 Oct 2014 11:25:58 +0000 (11:25 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 3 Oct 2014 11:25:58 +0000 (11:25 +0000)
commit01b3858e66ad4ce29bc0f762afd039ad0fb128be
treefc899700233623ba7f2409c1c5e073e19f1cc3c5
parentca77e5899373cb07a5aa01f19d3ad35ed14dba2c
[x86] Significantly improve the ability of the new vector shuffle
lowering to match VZEXT_MOVL patterns.

I hadn't realized that these had sufficient pattern smarts in the
backend to lower zext-ing from the low element of a vector without it
being a scalar_to_vector node. They do, and this is how to match a bunch
of patterns for movq, movss, etc.

There is a weird propensity to end up using pshufd to place the element
afterward even though it means domain crossing (or rather, to use
xorps+movss to zext the element rather than movq) but that's an
orthogonal problem with VZEXT_MOVL that someone should probably look at.

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