[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)
commitd5c2d287f98c39968934d4a241a6c1292052e140
treece319e077fa28b247f03ed4bf6ef5c570201afe0
parentab58a568ee6fdf7aefc20e1309f3a15d1152ee42
[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

llvm-svn: 232773
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/2012-04-26-sdglue.ll
llvm/test/CodeGen/X86/avx-cast.ll
llvm/test/CodeGen/X86/vector-shuffle-256-v32.ll