mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
[X86][SSE] Cleaned up shuffle decode assertion messages
llvm-svn: 283050
This commit is contained in:
parent
15c3bf66e9
commit
c8c1e1ed53
@ -69,9 +69,10 @@ static bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now extract the undef/constant bit data into the raw shuffle masks.
|
// Now extract the undef/constant bit data into the raw shuffle masks.
|
||||||
assert((CstSizeInBits % MaskEltSizeInBits) == 0 && "");
|
assert((CstSizeInBits % MaskEltSizeInBits) == 0 &&
|
||||||
unsigned NumMaskElts = CstSizeInBits / MaskEltSizeInBits;
|
"Unaligned shuffle mask size");
|
||||||
|
|
||||||
|
unsigned NumMaskElts = CstSizeInBits / MaskEltSizeInBits;
|
||||||
UndefElts = SmallBitVector(NumMaskElts, false);
|
UndefElts = SmallBitVector(NumMaskElts, false);
|
||||||
RawMask.resize(NumMaskElts, 0);
|
RawMask.resize(NumMaskElts, 0);
|
||||||
|
|
||||||
@ -99,7 +100,8 @@ void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
|
|||||||
Type *MaskTy = C->getType();
|
Type *MaskTy = C->getType();
|
||||||
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
|
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
|
||||||
(void)MaskTySize;
|
(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.
|
// The shuffle mask requires a byte vector.
|
||||||
SmallBitVector UndefElts;
|
SmallBitVector UndefElts;
|
||||||
@ -138,8 +140,9 @@ void DecodeVPERMILPMask(const Constant *C, unsigned ElSize,
|
|||||||
Type *MaskTy = C->getType();
|
Type *MaskTy = C->getType();
|
||||||
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
|
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
|
||||||
(void)MaskTySize;
|
(void)MaskTySize;
|
||||||
assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512);
|
assert((MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512) &&
|
||||||
assert(ElSize == 32 || ElSize == 64);
|
"Unexpected vector size.");
|
||||||
|
assert((ElSize == 32 || ElSize == 64) && "Unexpected vector element size.");
|
||||||
|
|
||||||
// The shuffle mask requires elements the same size as the target.
|
// The shuffle mask requires elements the same size as the target.
|
||||||
SmallBitVector UndefElts;
|
SmallBitVector UndefElts;
|
||||||
@ -174,7 +177,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
|
|||||||
Type *MaskTy = C->getType();
|
Type *MaskTy = C->getType();
|
||||||
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
|
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
|
||||||
(void)MaskTySize;
|
(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.
|
// The shuffle mask requires elements the same size as the target.
|
||||||
SmallBitVector UndefElts;
|
SmallBitVector UndefElts;
|
||||||
@ -224,7 +227,8 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DecodeVPPERMMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
|
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.
|
// The shuffle mask requires a byte vector.
|
||||||
SmallBitVector UndefElts;
|
SmallBitVector UndefElts;
|
||||||
|
Loading…
Reference in New Issue
Block a user