Optimization for certain shufflevector by using insertps.
authorFilipe Cabecinhas <me@filcab.net>
Fri, 25 Apr 2014 23:51:17 +0000 (23:51 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Fri, 25 Apr 2014 23:51:17 +0000 (23:51 +0000)
commit3c0216517260d98da308950c1bf93f9767a24fb6
tree91266485bd59c2fff3e7af008e6fd54f9824fb77
parentcee7abfb2c9b517f0120bbf8da04f433ebba942a
Optimization for certain shufflevector by using insertps.

Summary:
If we're doing a v4f32/v4i32 shuffle on x86 with SSE4.1, we can lower
certain shufflevectors to an insertps instruction:
When most of the shufflevector result's elements come from one vector (and
keep their index), and one element comes from another vector or a memory
operand.

Added tests for insertps optimizations on shufflevector.
Added support and tests for v4i32 vector optimization.

Reviewers: nadav

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/sse41.ll