[X86][SSE] Shuffle blends with zero
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Oct 2015 22:11:28 +0000 (22:11 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Oct 2015 22:11:28 +0000 (22:11 +0000)
commitd63f887b3e4b1d3c73dba88ec2529599803fd0c4
tree269bed18b1719e816e39193f3f3364e3f6300b21
parent154d0643db0af4ec6f07015ee5223dc5d42a77e3
[X86][SSE] Shuffle blends with zero

This patch generalizes the zeroing of vector elements with the BLEND instructions. Currently a zero vector will only blend if the shuffled elements are correctly inline, this patch recognises when a vector input is zero (or zeroable) and modifies a local copy of the shuffle mask to support a blend. As a zeroable vector input may not be all zeroes, the zeroable vector is regenerated if necessary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251659 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx-vperm2x128.ll
test/CodeGen/X86/vector-shuffle-128-v4.ll