OSDN Git Service

X86: Don't crash if we can't decode the pshufb mask
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 12 Feb 2015 23:26:26 +0000 (23:26 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 12 Feb 2015 23:26:26 +0000 (23:26 +0000)
commit73a92d513697a98cf773838af8cdd6a2ace7bcba
treeccfd4206bf85fcf096d32e80c33c243ce0194940
parentef1d2264bc75534e5bee298791c5fa9c220f68a4
X86: Don't crash if we can't decode the pshufb mask

Constant pool entries are uniqued by their contents regardless of their
type.  This means that a pshufb can have a shuffle mask which isn't a
simple array of bytes.

The code path which attempts to decode the mask didn't check for
failure, causing PR22559.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228979 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pshufb-mask-comments.ll