[X86, AVX] use blends instead of insert128 with index 0
authorSanjay Patel <spatel@rotateright.com>
Thu, 19 Mar 2015 22:29:40 +0000 (22:29 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 19 Mar 2015 22:29:40 +0000 (22:29 +0000)
commit11d77223a5d79c03d34be513269e56a2a241dfad
tree37e09a2d165db9179dd9bfc3bd112dcf6092e895
parenta60d430e31513a15a381d5af17869223958e3187
[X86, AVX] use blends instead of insert128 with index 0

Another case of x86-specific shuffle strength reduction:
avoid generating insert*128 instructions with index 0 because
they are slower than their non-lane-changing blend equivalents.

Shuffle lowering already catches most of these cases, but
the zero vector case and some other paths such as in the
modified test in vector-shuffle-256-v32.ll were getting
through.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232773 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/2012-04-26-sdglue.ll
test/CodeGen/X86/avx-cast.ll
test/CodeGen/X86/vector-shuffle-256-v32.ll