[X86][SSE] Improve PSHUFB shuffle mask decoding.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Feb 2016 10:17:40 +0000 (10:17 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Feb 2016 10:17:40 +0000 (10:17 +0000)
commit05e48b95eb9f4ccc3504d7c6ef0d3257bd0d04c3
tree66dbaf83e9a8908545b4479768bfe07f97cc7893
parent80440eb804bf3b2c13622dbcb9fa449be84aaed1
[X86][SSE] Improve PSHUFB shuffle mask decoding.

In cases where the PSHUFB shuffle mask is shared it might not be bitcasted to a vXi8 byte vector. This patch adds support for decoding these wider shuffle masks from the ConstantPool.

The test case in question makes use of this to recognise the shuffle mask is an unary UNPCKL pattern and simplifies accordingly.

llvm-svn: 261201
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
llvm/test/CodeGen/X86/pshufb-mask-comments.ll