OSDN Git Service

[x86] Begin emitting PBLENDW instructions for integer blend operations
authorChandler Carruth <chandlerc@gmail.com>
Mon, 15 Sep 2014 12:40:54 +0000 (12:40 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 15 Sep 2014 12:40:54 +0000 (12:40 +0000)
commitc5371836a589df2cd5297b0f46c8c37d588ee190
tree4b3d3471f594128dddcf23c48b27bd157cb1c325
parent9277ad2d36c9c0dd57e8293854ce32797f406e7d
[x86] Begin emitting PBLENDW instructions for integer blend operations
when SSE4.1 is available.

This removes a ton of domain crossing from blend code paths that were
ending up in the floating point code path.

This is just the tip of the iceberg though. The real switch is for
integer blend lowering to more actively rely on this instruction being
available so we don't hit shufps at all any longer. =] That will come in
a follow-up patch.

Another place where we need better support is for using PBLENDVB when
doing so avoids the need to have two complementary PSHUFB masks.

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