Skip to content

Commit 1256c72

Browse files
committed
fix assertion
Signed-off-by: Sidorov, Dmitry <[email protected]>
1 parent 513b17b commit 1256c72

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,8 +4577,7 @@ QualType ASTContext::getVectorType(QualType vecType, unsigned NumElts,
45774577
assert(vecType->isBuiltinType() ||
45784578
(vecType->isBitIntType() &&
45794579
// Only support _BitInt elements with byte-sized power of 2 NumBits.
4580-
llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) &&
4581-
vecType->castAs<BitIntType>()->getNumBits() >= 8));
4580+
llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits())));
45824581

45834582
// Check if we've already instantiated a vector of this type.
45844583
llvm::FoldingSetNodeID ID;
@@ -4650,8 +4649,7 @@ QualType ASTContext::getExtVectorType(QualType vecType,
46504649
assert(vecType->isBuiltinType() || vecType->isDependentType() ||
46514650
(vecType->isBitIntType() &&
46524651
// Only support _BitInt elements with byte-sized power of 2 NumBits.
4653-
llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) &&
4654-
vecType->castAs<BitIntType>()->getNumBits() >= 8));
4652+
llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits())));
46554653

46564654
// Check if we've already instantiated a vector of this type.
46574655
llvm::FoldingSetNodeID ID;

0 commit comments

Comments
 (0)