Loading clang/lib/AST/ASTContext.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -4014,8 +4014,8 @@ QualType ASTContext::getVectorType(QualType vecType, unsigned NumElts, assert(vecType->isBuiltinType() || (vecType->isBitIntType() && // Only support _BitInt elements with byte-sized power of 2 NumBits. llvm::isPowerOf2_32(vecType->getAs<BitIntType>()->getNumBits()) && vecType->getAs<BitIntType>()->getNumBits() >= 8)); llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) && vecType->castAs<BitIntType>()->getNumBits() >= 8)); // Check if we've already instantiated a vector of this type. llvm::FoldingSetNodeID ID; Loading llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -4402,7 +4402,7 @@ static void updateNVPTXMetadata(Function &Kernel, StringRef Name, int32_t Value, // Update the "maxntidx" metadata for NVIDIA, or add it. MDNode *ExistingOp = getNVPTXMDNode(Kernel, Name); if (ExistingOp) { auto *OldVal = dyn_cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); auto *OldVal = cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); int32_t OldLimit = cast<ConstantInt>(OldVal->getValue())->getZExtValue(); ExistingOp->replaceOperandWith( 2, ConstantAsMetadata::get(ConstantInt::get( Loading Loading @@ -4441,7 +4441,7 @@ OpenMPIRBuilder::readThreadBoundsForKernel(const Triple &T, Function &Kernel) { } if (MDNode *ExistingOp = getNVPTXMDNode(Kernel, "maxntidx")) { auto *OldVal = dyn_cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); auto *OldVal = cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); int32_t UB = cast<ConstantInt>(OldVal->getValue())->getZExtValue(); return {0, ThreadLimit ? std::min(ThreadLimit, UB) : UB}; } Loading Loading
clang/lib/AST/ASTContext.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -4014,8 +4014,8 @@ QualType ASTContext::getVectorType(QualType vecType, unsigned NumElts, assert(vecType->isBuiltinType() || (vecType->isBitIntType() && // Only support _BitInt elements with byte-sized power of 2 NumBits. llvm::isPowerOf2_32(vecType->getAs<BitIntType>()->getNumBits()) && vecType->getAs<BitIntType>()->getNumBits() >= 8)); llvm::isPowerOf2_32(vecType->castAs<BitIntType>()->getNumBits()) && vecType->castAs<BitIntType>()->getNumBits() >= 8)); // Check if we've already instantiated a vector of this type. llvm::FoldingSetNodeID ID; Loading
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -4402,7 +4402,7 @@ static void updateNVPTXMetadata(Function &Kernel, StringRef Name, int32_t Value, // Update the "maxntidx" metadata for NVIDIA, or add it. MDNode *ExistingOp = getNVPTXMDNode(Kernel, Name); if (ExistingOp) { auto *OldVal = dyn_cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); auto *OldVal = cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); int32_t OldLimit = cast<ConstantInt>(OldVal->getValue())->getZExtValue(); ExistingOp->replaceOperandWith( 2, ConstantAsMetadata::get(ConstantInt::get( Loading Loading @@ -4441,7 +4441,7 @@ OpenMPIRBuilder::readThreadBoundsForKernel(const Triple &T, Function &Kernel) { } if (MDNode *ExistingOp = getNVPTXMDNode(Kernel, "maxntidx")) { auto *OldVal = dyn_cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); auto *OldVal = cast<ConstantAsMetadata>(ExistingOp->getOperand(2)); int32_t UB = cast<ConstantInt>(OldVal->getValue())->getZExtValue(); return {0, ThreadLimit ? std::min(ThreadLimit, UB) : UB}; } Loading