[X86][SSE] Added common helper for shuffle mask constant pool decodes.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Sep 2016 15:25:48 +0000 (15:25 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 29 Sep 2016 15:25:48 +0000 (15:25 +0000)
commit97a4820ccdbee1f2fc67e8754903dc3a1a673dfd
treef5449ef1e8f39eea6cc665484edae5d093e06c47
parentd72330dd0976f3b323ec670f6500557f1ac9714f
[X86][SSE] Added common helper for shuffle mask constant pool decodes.

The shuffle mask decodes have a large amount of repeated code extracting/splitting mask values from Constant data.

This patch pulls all of this duplicated code into a single helper function to identify undef elements and combine/split constant integer data into the requested shuffle mask elements.

Updated PSHUFB/VPERMIL/VPERMIL2/VPPERM decoders to use it (VPERMV/VPERMV3 could be converted as well in the future).

llvm-svn: 282720
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp