OSDN Git Service

[X86][SSE] Added support for SSE3 lane duplication shuffle instructions
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 21 Jan 2015 22:44:35 +0000 (22:44 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 21 Jan 2015 22:44:35 +0000 (22:44 +0000)
commit42695901660b63b1ec9e9849131b6c44faff173e
tree6dbabad0f196eef4b160fe0f08fc25f51c62b777
parent50c3bc9956b4496856dab8cf3f221b433072931f
[X86][SSE] Added support for SSE3 lane duplication shuffle instructions

This patch adds shuffle matching for the SSE3 MOVDDUP, MOVSLDUP and MOVSHDUP instructions. The big use of these being that they avoid many single source shuffles from needing to use (pre-AVX) dual source instructions such as SHUFPD/SHUFPS: causing extra moves and preventing load folds.

Adding these instructions uncovered an issue in XFormVExtractWithShuffleIntoLoad which crashed on single operand shuffle instructions (now fixed). It also involved fixing getTargetShuffleMask to correctly identify theses instructions as unary shuffles.

Also adds a missing tablegen pattern for MOVDDUP.

Differential Revision: http://reviews.llvm.org/D7042

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226716 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/avx-splat.ll
test/CodeGen/X86/avx2-vbroadcast.ll
test/CodeGen/X86/sincos-opt.ll
test/CodeGen/X86/sse41.ll
test/CodeGen/X86/sse_partial_update.ll
test/CodeGen/X86/v2f32.ll
test/CodeGen/X86/vec_cast2.ll
test/CodeGen/X86/vector-shuffle-128-v2.ll
test/CodeGen/X86/vector-shuffle-256-v4.ll
test/CodeGen/X86/vector-shuffle-256-v8.ll
test/CodeGen/X86/vector-shuffle-512-v8.ll
test/CodeGen/X86/vector-shuffle-combining.ll