[x86] Use PALIGNR for v4i32 and v2i64 blends when appropriate.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 18 Sep 2014 09:00:25 +0000 (09:00 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 18 Sep 2014 09:00:25 +0000 (09:00 +0000)
commit72f0d9515e304395c2874c8750c69272d424e4ae
treee97bea81c7adda8ba3ba8baadbb40083e85b6df4
parent088aa097d58e24b876a4dc630ce829c9bc4569a4
[x86] Use PALIGNR for v4i32 and v2i64 blends when appropriate.

There is no purpose in using it for single-input shuffles as
pshufd is just as fast and doesn't tie the two operands. This removes
a substantial amount of wrong-domain blend operations in SSSE3 mode. It
also completes the usage of PALIGNR for integer shuffles and addresses
one of the test cases Quentin hit with the new vector shuffle lowering.

There is still the question of whether and when to use this for floating
point shuffles. It is faster than shufps or shufpd but in the integer
domain. I don't yet really have a good heuristic here for when to use
this instruction for floating point vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218038 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-128-v8.ll
test/CodeGen/X86/vector-shuffle-256-v4.ll