X86: Properly decode shuffle masks when the constant pool type is weird
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 11 Jan 2015 05:08:57 +0000 (05:08 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 11 Jan 2015 05:08:57 +0000 (05:08 +0000)
commitd2f4460ee73d452bb109db2f678fd837c92d2b22
tree9a6fed4737af0c64463c42360b023dba70136cf0
parent776673ea09ad292dd8acd75e5e25363eed0b6220
X86: Properly decode shuffle masks when the constant pool type is weird

It's possible for the constant pool entry for the shuffle mask to come
from a completely different operation.  This occurs when Constants have
the same bit pattern but have different types.

Make DecodePSHUFBMask tolerant of types which, after a bitcast, are
appropriately sized vector types.

This fixes PR22188.

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