[X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.
authorCraig Topper <craig.topper@intel.com>
Wed, 7 Aug 2019 05:34:27 +0000 (05:34 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 7 Aug 2019 05:34:27 +0000 (05:34 +0000)
commit29688f4da0b62e760dcd65d607aa9a56cb1557e0
tree293a2cc5eb55bffe628ebba214b1c5562757c15c
parent989679c3711a239c73057fb5446eef937935f4ba
[X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.

The upper 4 bits of the immediate byte are used to encode a
register. We need to limit the explicit immediate to fit in the
remaining 4 bits.

Fixes PR42899.

llvm-svn: 368123
llvm/lib/Target/X86/AsmParser/X86AsmParserCommon.h
llvm/lib/Target/X86/AsmParser/X86Operand.h
llvm/lib/Target/X86/X86InstrInfo.td
llvm/lib/Target/X86/X86InstrXOP.td
llvm/test/MC/X86/x86_errors.s
llvm/test/tools/llvm-mca/X86/BdVer2/xop-super-registers-2.s
llvm/test/tools/llvm-mca/X86/Generic/xop-super-registers-2.s
llvm/utils/TableGen/X86RecognizableInstr.cpp