OSDN Git Service

[x86] Teach the new vector shuffle lowering to use BLENDPS and BLENDPD.
authorChandler Carruth <chandlerc@gmail.com>
Sun, 14 Sep 2014 23:43:33 +0000 (23:43 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 14 Sep 2014 23:43:33 +0000 (23:43 +0000)
commite610c324e1a56843abdff27a1bf30d188255a23b
tree62f4e2b0018db3d7c49a68a2d9187231715475ac
parent0309c5d4bcfc75fe4b52e7874d35e91bbb01c02a
[x86] Teach the new vector shuffle lowering to use BLENDPS and BLENDPD.

These are super simple. They even take precedence over crazy
instructions like INSERTPS because they have very high throughput on
modern x86 chips.

I still have to teach the integer shuffle variants about this to avoid
so many domain crossings. However, due to the particular instructions
available, that's a touch more complex and so a separate patch.

Also, the backend doesn't seem to realize it can commute blend
instructions by negating the mask. That would help remove a number of
copies here. Suggestions on how to do this welcome, it's an area I'm
less familiar with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217744 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