diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-10-01 20:12:56 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-10-01 20:12:56 +0000 |
commit | 630dd6ff0280a2111bb651ff743fc28676373761 (patch) | |
tree | d00bd00816dcbbbfa75d865e861293b7b10b8bbd | |
parent | 5652c9c830bfdff02c5a04f7f770a28b7fa64383 (diff) | |
download | bcm5719-llvm-630dd6ff0280a2111bb651ff743fc28676373761.tar.gz bcm5719-llvm-630dd6ff0280a2111bb651ff743fc28676373761.zip |
[X86][SSE] Cleaned up shuffle decode assertion messages
llvm-svn: 283050
-rw-r--r-- | llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp b/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp index 09c31455c42..f00c85eda1a 100644 --- a/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp +++ b/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp @@ -69,9 +69,10 @@ static bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits, } // Now extract the undef/constant bit data into the raw shuffle masks. - assert((CstSizeInBits % MaskEltSizeInBits) == 0 && ""); - unsigned NumMaskElts = CstSizeInBits / MaskEltSizeInBits; + assert((CstSizeInBits % MaskEltSizeInBits) == 0 && + "Unaligned shuffle mask size"); + unsigned NumMaskElts = CstSizeInBits / MaskEltSizeInBits; UndefElts = SmallBitVector(NumMaskElts, false); RawMask.resize(NumMaskElts, 0); @@ -99,7 +100,8 @@ void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) { Type *MaskTy = C->getType(); unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits(); (void)MaskTySize; - assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512); + assert((MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512) && + "Unexpected vector size."); // The shuffle mask requires a byte vector. SmallBitVector UndefElts; @@ -138,8 +140,9 @@ void DecodeVPERMILPMask(const Constant *C, unsigned ElSize, Type *MaskTy = C->getType(); unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits(); (void)MaskTySize; - assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512); - assert(ElSize == 32 || ElSize == 64); + assert((MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512) && + "Unexpected vector size."); + assert((ElSize == 32 || ElSize == 64) && "Unexpected vector element size."); // The shuffle mask requires elements the same size as the target. SmallBitVector UndefElts; @@ -174,7 +177,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize, Type *MaskTy = C->getType(); unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits(); (void)MaskTySize; - assert(MaskTySize == 128 || MaskTySize == 256); + assert((MaskTySize == 128 || MaskTySize == 256) && "Unexpected vector size."); // The shuffle mask requires elements the same size as the target. SmallBitVector UndefElts; @@ -224,7 +227,8 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize, } void DecodeVPPERMMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) { - assert(C->getType()->getPrimitiveSizeInBits() == 128); + assert(C->getType()->getPrimitiveSizeInBits() == 128 && + "Unexpected vector size."); // The shuffle mask requires a byte vector. SmallBitVector UndefElts; |