|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
lib/IR/Verifier.cpp 547 Assert(I.getOperand(i) != nullptr, "Operand is null", &I);
565 Assert(!GV.isDeclaration() || GV.hasValidDeclarationLinkage(),
568 Assert(GV.getAlignment() <= Value::MaximumAlignment,
570 Assert(!GV.hasAppendingLinkage() || isa<GlobalVariable>(GV),
575 Assert(GVar && GVar->getValueType()->isArrayTy(),
580 Assert(!GV.hasComdat(), "Declaration may not be in a Comdat!", &GV);
583 Assert(!GV.isDSOLocal(),
586 Assert((GV.isDeclaration() && GV.hasExternalLinkage()) ||
592 Assert(GV.isDSOLocal(),
597 Assert(GV.isDSOLocal(),
603 CheckFailed("Global is referenced by parentless instruction!", &GV, &M,
606 CheckFailed("Global is referenced in a different module!", &GV, &M, I,
612 CheckFailed("Global is used by function in a different module", &GV, &M,
622 Assert(GV.getInitializer()->getType() == GV.getValueType(),
629 Assert(GV.getInitializer()->isNullValue(),
631 Assert(!GV.isConstant(), "'common' global may not be marked constant!",
633 Assert(!GV.hasComdat(), "'common' global may not be in a Comdat!", &GV);
639 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(),
648 Assert(STy &&
657 Assert(ETy->isPointerTy() &&
665 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(),
670 Assert(PTy, "wrong type for intrinsic global variable", &GV);
674 Assert(InitArray, "wrong initalizer for intrinsic global variable",
678 Assert(isa<GlobalVariable>(V) || isa<Function>(V) ||
681 Assert(V->hasName(), "members of llvm.used must be named", V);
703 Assert(!VTy->isScalable(), "Globals cannot contain scalable vectors", &GV);
725 Assert(!GV->isDeclarationForLinker(), "Alias must point to a definition",
729 Assert(Visited.insert(GA2).second, "Aliases cannot form a cycle", &GA);
731 Assert(!GA2->isInterposable(), "Alias cannot point to an interposable alias",
753 Assert(GlobalAlias::isValidLinkage(GA.getLinkage()),
758 Assert(Aliasee, "Aliasee cannot be NULL!", &GA);
759 Assert(GA.getType() == Aliasee->getType(),
762 Assert(isa<GlobalValue>(Aliasee) || isa<ConstantExpr>(Aliasee),
809 Assert(!isa<LocalAsMetadata>(Op), "Invalid operand for global metadata!",
822 Assert(!MD.isTemporary(), "Expected no forward declarations!", &MD);
823 Assert(MD.isResolved(), "All nodes should be resolved!", &MD);
827 Assert(MD.getValue(), "Expected valid value", &MD);
828 Assert(!MD.getValue()->getType()->isMetadataTy(),
835 Assert(F, "function-local metadata used outside a function", L);
841 Assert(I->getParent(), "function-local metadata not in basic block", L, I);
849 Assert(ActualF == F, "function-local metadata used in wrong function", L);
1320 Assert(!GV->hasPrivateLinkage(),
1332 Assert(N->getNumOperands() == 1,
1334 Assert(dyn_cast_or_null<MDString>(N->getOperand(0)),
1350 Assert(N->getNumOperands() == 1,
1352 Assert(dyn_cast_or_null<MDString>(N->getOperand(0)),
1376 CheckFailed("invalid requirement on flag, flag is not present in module",
1382 CheckFailed(("invalid requirement on flag, "
1396 Assert(Op->getNumOperands() == 3,
1400 Assert(
1404 Assert(false,
1409 Assert(ID, "invalid ID operand in module flag (expected metadata string)",
1421 Assert(mdconst::dyn_extract_or_null<ConstantInt>(Op->getOperand(2)),
1431 Assert(Value && Value->getNumOperands() == 2,
1434 Assert(isa<MDString>(Value->getOperand(0)),
1448 Assert(isa<MDNode>(Op->getOperand(2)),
1459 Assert(Inserted,
1488 Assert(F && isa<Function>(F->getValue()), "expected a Function or null",
1492 Assert(Node && Node->getNumOperands() == 3, "expected a MDNode triple", MDO);
1496 Assert(Count && Count->getType()->isIntegerTy(),
1569 CheckFailed("Attribute '" + A.getAsString() +
1575 CheckFailed("Attribute '" + A.getAsString() +
1593 Assert(Attrs.getNumAttributes() == 1,
1605 Assert(AttrCount <= 1, "Attributes 'byval', 'inalloca', 'inreg', 'nest', "
1609 Assert(!(Attrs.hasAttribute(Attribute::InAlloca) &&
1615 Assert(!(Attrs.hasAttribute(Attribute::StructRet) &&
1621 Assert(!(Attrs.hasAttribute(Attribute::ZExt) &&
1627 Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
1633 Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
1639 Assert(!(Attrs.hasAttribute(Attribute::ReadOnly) &&
1645 Assert(!(Attrs.hasAttribute(Attribute::NoInline) &&
1652 Assert(Attrs.getByValType() == cast<PointerType>(Ty)->getElementType(),
1657 Assert(!AttrBuilder(Attrs).overlaps(IncompatibleAttrs),
1665 Assert(!Attrs.hasAttribute(Attribute::ByVal) &&
1671 Assert(!Attrs.hasAttribute(Attribute::SwiftError),
1676 Assert(!Attrs.hasAttribute(Attribute::ByVal),
1679 Assert(!Attrs.hasAttribute(Attribute::SwiftError),
1701 Assert((!RetAttrs.hasAttribute(Attribute::ByVal) &&
1713 Assert((!RetAttrs.hasAttribute(Attribute::ReadOnly) &&
1727 Assert(!ArgAttrs.hasAttribute(Attribute::ImmArg),
1734 Assert(!SawNest, "More than one parameter has attribute nest!", V);
1739 Assert(!SawReturned, "More than one parameter has attribute returned!",
1741 Assert(Ty->canLosslesslyBitCastTo(FT->getReturnType()),
1748 Assert(!SawSRet, "Cannot have multiple 'sret' parameters!", V);
1749 Assert(i == 0 || i == 1,
1755 Assert(!SawSwiftSelf, "Cannot have multiple 'swiftself' parameters!", V);
1760 Assert(!SawSwiftError, "Cannot have multiple 'swifterror' parameters!",
1766 Assert(i == FT->getNumParams() - 1,
1776 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1780 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1784 Assert(!(Attrs.hasFnAttribute(Attribute::ReadOnly) &&
1788 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1794 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1798 Assert(!(Attrs.hasFnAttribute(Attribute::NoInline) &&
1803 Assert(Attrs.hasFnAttribute(Attribute::NoInline),
1806 Assert(!Attrs.hasFnAttribute(Attribute::OptimizeForSize),
1809 Assert(!Attrs.hasFnAttribute(Attribute::MinSize),
1815 Assert(GV->hasGlobalUnnamedAddr(),
1825 CheckFailed("'allocsize' " + Name + " argument is out of bounds", V);
1830 CheckFailed("'allocsize' " + Name +
1852 Assert(MD->getNumOperands() >= 2,
1856 Assert(MD->getOperand(0) != nullptr, "first operand should not be null",
1858 Assert(isa<MDString>(MD->getOperand(0)),
1862 Assert(ProfName.equals("function_entry_count") ||
1869 Assert(MD->getOperand(1) != nullptr, "second operand should not be null",
1871 Assert(isa<ConstantAsMetadata>(MD->getOperand(1)),
1894 Assert(GV->getParent() == &M, "Referencing global in another module!",
1913 Assert(CastInst::castIsValid(Instruction::BitCast, CE->getOperand(0),
1943 Assert(!Call.doesNotAccessMemory() && !Call.onlyReadsMemory() &&
1952 Assert(NumPatchBytes >= 0,
1959 Assert(PT && PT->getElementType()->isFunctionTy(),
1964 Assert(NumCallArgs >= 0,
1970 Assert(NumCallArgs >= NumParams,
1974 Assert(TargetFuncType->getReturnType()->isVoidTy(),
1979 Assert(NumCallArgs == NumParams,
1984 Assert((Flags & ~(uint64_t)StatepointFlags::MaskAll) == 0,
1993 Assert(ArgType == ParamType,
2000 Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
2009 Assert(isa<ConstantInt>(NumTransitionArgsV),
2015 Assert(NumTransitionArgs >= 0,
2020 Assert(isa<ConstantInt>(NumDeoptArgsV),
2025 Assert(NumDeoptArgs >= 0,
2032 Assert(ExpectedNumArgs <= (int)Call.arg_size(),
2040 Assert(UserCall, "illegal use of statepoint token", Call, U);
2043 Assert(isa<GCRelocateInst>(UserCall) || isa<GCResultInst>(UserCall),
2048 Assert(UserCall->getArgOperand(0) == &Call,
2051 Assert(UserCall->getArgOperand(0) == &Call,
2071 Assert(MaxRecoveredIndex <= EscapedObjectCount,
2112 Assert(false, "EH pads can't handle each other's exceptions",
2141 Assert(&Context == &F.getContext(),
2144 Assert(!F.hasCommonLinkage(), "Functions may not have common linkage", &F);
2145 Assert(FT->getNumParams() == NumArgs,
2148 Assert(F.getReturnType()->isFirstClassType() ||
2152 Assert(!F.hasStructRetAttr() || F.getReturnType()->isVoidTy(),
2157 Assert(verifyAttributeCount(Attrs, FT->getNumParams()),
2169 Assert(!Attrs.hasFnAttribute(Attribute::Builtin),
2181 Assert(F.getReturnType()->isVoidTy(),
2189 Assert(!F.hasStructRetAttr(),
2197 Assert(!F.isVarArg(), "Calling convention does not support varargs or "
2206 Assert(Arg.getType() == FT->getParamType(i),
2209 Assert(Arg.getType()->isFirstClassType(),
2212 Assert(!Arg.getType()->isMetadataTy(),
2214 Assert(!Arg.getType()->isTokenTy(),
2226 Assert(!F.getReturnType()->isTokenTy(),
2239 Assert(Per->getParent() == F.getParent(),
2246 Assert(MDs.empty(), "unmaterialized function cannot have metadata", &F,
2255 Assert(I.first != LLVMContext::MD_prof,
2261 Assert(!F.hasPersonalityFn(),
2266 Assert(!isLLVMdotName, "llvm intrinsics cannot be defined!", &F);
2270 Assert(pred_empty(Entry),
2275 Assert(!BlockAddress::lookup(Entry)->isConstantUsed(),
2301 Assert(NumProfAttachments == 1,
2318 Assert(false, "Invalid user of intrinsic instruction!", U);
2379 Assert(BB.getTerminator(), "Basic Block does not have terminator!", &BB);
2389 Assert(PN.getNumIncomingValues() != 0,
2393 Assert(PN.getNumIncomingValues() == Preds.size(),
2411 Assert(i == 0 || Values[i].first != Values[i - 1].first ||
2419 Assert(Values[i].first == Preds[i],
2435 Assert(&I == I.getParent()->getTerminator(),
2442 Assert(BI.getCondition()->getType()->isIntegerTy(1),
2452 Assert(N == 0,
2457 Assert(N == 1 && F->getReturnType() == RI.getOperand(0)->getType(),
2473 Assert(Case.getCaseValue()->getType() == SwitchTy,
2475 Assert(Constants.insert(Case.getCaseValue()).second,
2483 Assert(BI.getAddress()->getType()->isPointerTy(),
2486 Assert(BI.getDestination(i)->getType()->isLabelTy(),
2493 Assert(CBI.isInlineAsm(), "Callbr is currently only used for asm-goto!",
2495 Assert(CBI.getType()->isVoidTy(), "Callbr return value is not supported!",
2498 Assert(CBI.getSuccessor(i)->getType()->isLabelTy(),
2501 Assert(i >= CBI.getNumArgOperands() || !isa<BasicBlock>(CBI.getOperand(i)),
2505 Assert(CBI.getOperand(i) != CBI.getOperand(j),
2514 Assert(ArgBBs.find(BB) != ArgBBs.end(),
2522 Assert(!SelectInst::areInvalidOperands(SI.getOperand(0), SI.getOperand(1),
2526 Assert(SI.getTrueValue()->getType() == SI.getType(),
2535 Assert(false, "User-defined operators should not live outside of a pass!", &I);
2547 Assert(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I);
2548 Assert(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I);
2549 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2551 Assert(SrcBitSize > DestBitSize, "DestTy too big for Trunc", &I);
2562 Assert(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I);
2563 Assert(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I);
2564 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2569 Assert(SrcBitSize < DestBitSize, "Type too small for ZExt", &I);
2583 Assert(SrcTy->isIntOrIntVectorTy(), "SExt only operates on integer", &I);
2584 Assert(DestTy->isIntOrIntVectorTy(), "SExt only produces an integer", &I);
2585 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2587 Assert(SrcBitSize < DestBitSize, "Type too small for SExt", &I);
2600 Assert(SrcTy->isFPOrFPVectorTy(), "FPTrunc only operates on FP", &I);
2601 Assert(DestTy->isFPOrFPVectorTy(), "FPTrunc only produces an FP", &I);
2602 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2604 Assert(SrcBitSize > DestBitSize, "DestTy too big for FPTrunc", &I);
2618 Assert(SrcTy->isFPOrFPVectorTy(), "FPExt only operates on FP", &I);
2619 Assert(DestTy->isFPOrFPVectorTy(), "FPExt only produces an FP", &I);
2620 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2622 Assert(SrcBitSize < DestBitSize, "DestTy too small for FPExt", &I);
2635 Assert(SrcVec == DstVec,
2637 Assert(SrcTy->isIntOrIntVectorTy(),
2639 Assert(DestTy->isFPOrFPVectorTy(), "UIToFP result must be FP or FP vector",
2643 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2658 Assert(SrcVec == DstVec,
2660 Assert(SrcTy->isIntOrIntVectorTy(),
2662 Assert(DestTy->isFPOrFPVectorTy(), "SIToFP result must be FP or FP vector",
2666 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2681 Assert(SrcVec == DstVec,
2683 Assert(SrcTy->isFPOrFPVectorTy(), "FPToUI source must be FP or FP vector",
2685 Assert(DestTy->isIntOrIntVectorTy(),
2689 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2704 Assert(SrcVec == DstVec,
2706 Assert(SrcTy->isFPOrFPVectorTy(), "FPToSI source must be FP or FP vector",
2708 Assert(DestTy->isIntOrIntVectorTy(),
2712 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2724 Assert(SrcTy->isPtrOrPtrVectorTy(), "PtrToInt source must be pointer", &I);
2730 Assert(DestTy->isIntOrIntVectorTy(), "PtrToInt result must be integral", &I);
2731 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), "PtrToInt type mismatch",
2737 Assert(VSrc->getNumElements() == VDest->getNumElements(),
2749 Assert(SrcTy->isIntOrIntVectorTy(),
2751 Assert(DestTy->isPtrOrPtrVectorTy(), "IntToPtr result must be a pointer", &I);
2757 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), "IntToPtr type mismatch",
2762 Assert(VSrc->getNumElements() == VDest->getNumElements(),
2769 Assert(
2779 Assert(SrcTy->isPtrOrPtrVectorTy(), "AddrSpaceCast source must be a pointer",
2781 Assert(DestTy->isPtrOrPtrVectorTy(), "AddrSpaceCast result must be a pointer",
2783 Assert(SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace(),
2786 Assert(SrcTy->getVectorNumElements() == DestTy->getVectorNumElements(),
2798 Assert(&PN == &PN.getParent()->front() ||
2808 Assert(PN.getType() == IncValue->getType(),
2818 Assert(Call.getCalledValue()->getType()->isPointerTy(),
2822 Assert(FPTy->getElementType()->isFunctionTy(),
2825 Assert(FPTy->getElementType() == Call.getFunctionType(),
2832 Assert(Call.arg_size() >= FTy->getNumParams(),
2836 Assert(Call.arg_size() == FTy->getNumParams(),
2841 Assert(Call.getArgOperand(i)->getType() == FTy->getParamType(i),
2847 Assert(verifyAttributeCount(Attrs, Call.arg_size()),
2859 Assert(Callee && Callee->isSpeculatable(),
2872 Assert(AI->isUsedWithInAlloca(),
2883 Assert(AI->isSwiftError(),
2888 Assert(ArgI,
2891 Assert(ArgI->hasSwiftErrorAttr(),
2899 Assert(Callee && Callee->hasParamAttribute(i, Attribute::ImmArg),
2906 Assert(isa<ConstantInt>(ArgVal) || isa<ConstantFP>(ArgVal),
2930 Assert(!SawNest, "More than one parameter has attribute nest!", Call);
2935 Assert(!SawReturned, "More than one parameter has attribute returned!",
2937 Assert(Ty->canLosslesslyBitCastTo(FTy->getReturnType()),
2949 Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
2954 Assert(Idx == Call.arg_size() - 1,
2962 Assert(!ParamTy->isMetadataTy(),
2964 Assert(!ParamTy->isTokenTy(),
2986 Assert(!FoundDeoptBundle, "Multiple deopt operand bundles", Call);
2989 Assert(!FoundGCTransitionBundle, "Multiple gc-transition operand bundles",
2993 Assert(!FoundFuncletBundle, "Multiple funclet operand bundles", Call);
2995 Assert(BU.Inputs.size() == 1,
2997 Assert(isa<FuncletPadInst>(BU.Inputs.front()),
3001 Assert(!FoundCFGuardTargetBundle,
3004 Assert(BU.Inputs.size() == 1,
3050 Assert(!CI.isInlineAsm(), "cannot use musttail call with inline asm", &CI);
3059 Assert(CallerTy->getNumParams() == CalleeTy->getNumParams(),
3063 Assert(
3068 Assert(CallerTy->isVarArg() == CalleeTy->isVarArg(),
3070 Assert(isTypeCongruent(CallerTy->getReturnType(), CalleeTy->getReturnType()),
3074 Assert(F->getCallingConv() == CI.getCallingConv(),
3084 Assert(CallerABIAttrs == CalleeABIAttrs,
3099 Assert(BI->getOperand(0) == RetVal,
3107 Assert(Ret, "musttail call must precede a ret with an optional bitcast",
3109 Assert(!Ret->getReturnValue() || Ret->getReturnValue() == RetVal,
3125 Assert(
3136 Assert(U.getType() == U.getOperand(0)->getType(),
3145 Assert(U.getType()->isFPOrFPVectorTy(),
3159 Assert(B.getOperand(0)->getType() == B.getOperand(1)->getType(),
3172 Assert(B.getType()->isIntOrIntVectorTy(),
3174 Assert(B.getType() == B.getOperand(0)->getType(),
3186 Assert(B.getType()->isFPOrFPVectorTy(),
3190 Assert(B.getType() == B.getOperand(0)->getType(),
3199 Assert(B.getType()->isIntOrIntVectorTy(),
3201 Assert(B.getType() == B.getOperand(0)->getType(),
3208 Assert(B.getType()->isIntOrIntVectorTy(),
3210 Assert(B.getType() == B.getOperand(0)->getType(),
3224 Assert(Op0Ty == Op1Ty,
3227 Assert(Op0Ty->isIntOrIntVectorTy() || Op0Ty->isPtrOrPtrVectorTy(),
3230 Assert(IC.isIntPredicate(),
3240 Assert(Op0Ty == Op1Ty,
3243 Assert(Op0Ty->isFPOrFPVectorTy(),
3246 Assert(FC.isFPPredicate(),
3253 Assert(
3260 Assert(InsertElementInst::isValidOperands(IE.getOperand(0), IE.getOperand(1),
3267 Assert(ShuffleVectorInst::isValidOperands(SV.getOperand(0), SV.getOperand(1),
3276 Assert(isa<PointerType>(TargetTy),
3278 Assert(GEP.getSourceElementType()->isSized(), "GEP into unsized type!", &GEP);
3281 Assert(all_of(
3286 Assert(ElTy, "Invalid indices for GEP pointer type!", &GEP);
3288 Assert(GEP.getType()->isPtrOrPtrVectorTy() &&
3296 Assert(GEPWidth == GEP.getPointerOperandType()->getVectorNumElements(),
3302 Assert(IndexWidth == GEPWidth, "Invalid GEP index vector width", &GEP);
3310 Assert(GEP.getAddressSpace() == PTy->getAddressSpace(),
3326 Assert(NumOperands % 2 == 0, "Unfinished range!", Range);
3328 Assert(NumRanges >= 1, "It should have at least one range!", Range);
3334 Assert(Low, "The lower limit must be an integer!", Low);
3337 Assert(High, "The upper limit must be an integer!", High);
3338 Assert(High->getType() == Low->getType() && High->getType() == Ty,
3344 Assert(!CurRange.isEmptySet() && !CurRange.isFullSet(),
3347 Assert(CurRange.intersectWith(LastRange).isEmptySet(),
3349 Assert(LowV.sgt(LastRange.getLower()), "Intervals are not in order",
3351 Assert(!isContiguous(CurRange, LastRange), "Intervals are contiguous",
3362 Assert(FirstRange.intersectWith(LastRange).isEmptySet(),
3364 Assert(!isContiguous(FirstRange, LastRange), "Intervals are contiguous",
3371 Assert(Size >= 8, "atomic memory access' size must be byte-sized", Ty, I);
3372 Assert(!(Size & (Size - 1)),
3378 Assert(PTy, "Load operand must be a pointer.", &LI);
3380 Assert(LI.getAlignment() <= Value::MaximumAlignment,
3382 Assert(ElTy->isSized(), "loading unsized types is not allowed", &LI);
3384 Assert(LI.getOrdering() != AtomicOrdering::Release &&
3387 Assert(LI.getAlignment() != 0,
3389 Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
3395 Assert(LI.getSyncScopeID() == SyncScope::System,
3404 Assert(PTy, "Store operand must be a pointer.", &SI);
3406 Assert(ElTy == SI.getOperand(0)->getType(),
3408 Assert(SI.getAlignment() <= Value::MaximumAlignment,
3410 Assert(ElTy->isSized(), "storing unsized types is not allowed", &SI);
3412 Assert(SI.getOrdering() != AtomicOrdering::Acquire &&
3415 Assert(SI.getAlignment() != 0,
3417 Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
3423 Assert(SI.getSyncScopeID() == SyncScope::System,
3435 Assert(Call.paramHasAttr(Idx, Attribute::SwiftError),
3447 Assert(isa<LoadInst>(U) || isa<StoreInst>(U) || isa<CallInst>(U) ||
3454 Assert(StoreI->getOperand(1) == SwiftErrorVal,
3466 Assert(PTy->getAddressSpace() == DL.getAllocaAddrSpace(),
3469 Assert(AI.getAllocatedType()->isSized(&Visited),
3471 Assert(AI.getArraySize()->getType()->isIntegerTy(),
3473 Assert(AI.getAlignment() <= Value::MaximumAlignment,
3486 Assert(CXI.getSuccessOrdering() != AtomicOrdering::NotAtomic,
3488 Assert(CXI.getFailureOrdering() != AtomicOrdering::NotAtomic,
3490 Assert(CXI.getSuccessOrdering() != AtomicOrdering::Unordered,
3492 Assert(CXI.getFailureOrdering() != AtomicOrdering::Unordered,
3494 Assert(!isStrongerThan(CXI.getFailureOrdering(), CXI.getSuccessOrdering()),
3498 Assert(CXI.getFailureOrdering() != AtomicOrdering::Release &&
3503 Assert(PTy, "First cmpxchg operand must be a pointer.", &CXI);
3505 Assert(ElTy->isIntOrPtrTy(),
3508 Assert(ElTy == CXI.getOperand(1)->getType(),
3511 Assert(ElTy == CXI.getOperand(2)->getType(),
3517 Assert(RMWI.getOrdering() != AtomicOrdering::NotAtomic,
3519 Assert(RMWI.getOrdering() != AtomicOrdering::Unordered,
3523 Assert(PTy, "First atomicrmw operand must be a pointer.", &RMWI);
3526 Assert(ElTy->isIntegerTy() || ElTy->isFloatingPointTy(), "atomicrmw " +
3531 Assert(ElTy->isFloatingPointTy(), "atomicrmw " +
3536 Assert(ElTy->isIntegerTy(), "atomicrmw " +
3542 Assert(ElTy == RMWI.getOperand(1)->getType(),
3545 Assert(AtomicRMWInst::FIRST_BINOP <= Op && Op <= AtomicRMWInst::LAST_BINOP,
3552 Assert(Ordering == AtomicOrdering::Acquire ||
3563 Assert(ExtractValueInst::getIndexedType(EVI.getAggregateOperand()->getType(),
3571 Assert(ExtractValueInst::getIndexedType(IVI.getAggregateOperand()->getType(),
3592 Assert(BB != &F->getEntryBlock(), "EH pad cannot be in entry block.", &I);
3600 Assert(II && II->getUnwindDest() == BB && II->getNormalDest() != BB,
3609 Assert(BB->getUniquePredecessor() == CPI->getCatchSwitch()->getParent(),
3613 Assert(BB != CPI->getCatchSwitch()->getUnwindDest(),
3627 Assert(II->getUnwindDest() == BB && II->getNormalDest() != BB,
3635 Assert(FromPad != ToPadParent, "A cleanupret must exit its cleanup", CRI);
3639 Assert(false, "EH pad must be jumped to via an unwind edge", ToPad, TI);
3645 Assert(FromPad != ToPad,
3651 Assert(!isa<ConstantTokenNone>(FromPad),
3653 Assert(Seen.insert(FromPad).second,
3662 Assert(LPI.getNumClauses() > 0 || LPI.isCleanup(),
3670 Assert(LandingPadResultTy == LPI.getType(),
3676 Assert(F->hasPersonalityFn(),
3681 Assert(LPI.getParent()->getLandingPadInst() == &LPI,
3688 Assert(isa<PointerType>(Clause->getType()),
3691 Assert(LPI.isFilter(i), "Clause is neither catch nor filter!", &LPI);
3692 Assert(isa<ConstantArray>(Clause) || isa<ConstantAggregateZero>(Clause),
3701 Assert(RI.getFunction()->hasPersonalityFn(),
3707 Assert(LandingPadResultTy == RI.getValue()->getType(),
3719 Assert(F->hasPersonalityFn(),
3722 Assert(isa<CatchSwitchInst>(CPI.getParentPad()),
3728 Assert(BB->getFirstNonPHI() == &CPI,
3736 Assert(isa<CatchPadInst>(CatchReturn.getOperand(0)),
3747 Assert(F->hasPersonalityFn(),
3752 Assert(BB->getFirstNonPHI() == &CPI,
3757 Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad),
3772 Assert(Seen.insert(CurrentPad).second,
3801 Assert(isa<CatchReturnInst>(U), "Bogus funclet pad use", U);
3851 Assert(UnwindPad == FirstUnwindPad, "Unwind edges out of a funclet "
3913 Assert(SwitchUnwindPad == FirstUnwindPad,
3927 Assert(F->hasPersonalityFn(),
3933 Assert(BB->getFirstNonPHI() == &CatchSwitch,
3938 Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad),
3943 Assert(I->isEHPad() && !isa<LandingPadInst>(I),
3953 Assert(CatchSwitch.getNumHandlers() != 0,
3957 Assert(isa<CatchPadInst>(Handler->getFirstNonPHI()),
3966 Assert(isa<CleanupPadInst>(CRI.getOperand(0)),
3972 Assert(I->isEHPad() && !isa<LandingPadInst>(I),
4002 Assert(DT.dominates(Op, U),
4007 Assert(I.getType()->isPointerTy(), "dereferenceable, dereferenceable_or_null "
4009 Assert((isa<LoadInst>(I) || isa<IntToPtrInst>(I)),
4012 Assert(MD->getNumOperands() == 1, "dereferenceable, dereferenceable_or_null "
4015 Assert(CI && CI->getType()->isIntegerTy(64), "dereferenceable, "
4020 Assert(MD->getNumOperands() >= 2,
4024 Assert(MD->getOperand(0) != nullptr, "first operand should not be null", MD);
4025 Assert(isa<MDString>(MD->getOperand(0)),
4044 CheckFailed("!prof branch_weights are not allowed for this instruction",
4047 Assert(MD->getNumOperands() == 1 + ExpectedNumOperands,
4051 Assert(MDO, "second operand should not be null", MD);
4062 Assert(BB, "Instruction not embedded in basic block!", &I);
4066 Assert(U != (User *)&I || !DT.isReachableFromEntry(BB),
4072 Assert(!I.getType()->isVoidTy() || !I.hasName(),
4077 Assert(I.getType()->isVoidTy() || I.getType()->isFirstClassType(),
4082 Assert(!I.getType()->isMetadataTy() || isa<CallInst>(I) || isa<InvokeInst>(I),
4090 Assert(Used->getParent() != nullptr,
4095 CheckFailed("Use of instruction is not an instruction!", U);
4105 Assert(I.getOperand(i) != nullptr, "Instruction has null operand!", &I);
4110 Assert(false, "Instruction operands must be first-class values!", &I);
4116 Assert(!F->isIntrinsic() ||
4119 Assert(
4131 Assert(F->getParent() == &M, "Referencing function in another module!",
4134 Assert(OpBB->getParent() == BB->getParent(),
4137 Assert(OpArg->getParent() == BB->getParent(),
4140 Assert(GV->getParent() == &M, "Referencing global in another module!", &I,
4145 Assert(CBI && &CBI->getCalledOperandUse() == &I.getOperandUse(i),
4160 Assert(I.getType()->isFPOrFPVectorTy(),
4162 Assert(MD->getNumOperands() == 1, "fpmath takes one operand!", &I);
4166 Assert(&Accuracy.getSemantics() == &APFloat::IEEEsingle(),
4168 Assert(Accuracy.isFiniteNonZero() && !Accuracy.isNegative(),
4171 Assert(false, "invalid fpmath accuracy!", &I);
4176 Assert(isa<LoadInst>(I) || isa<CallInst>(I) || isa<InvokeInst>(I),
4182 Assert(I.getType()->isPointerTy(), "nonnull applies only to pointer types",
4184 Assert(isa<LoadInst>(I),
4200 Assert(I.getType()->isPointerTy(), "align applies only to pointer types",
4202 Assert(isa<LoadInst>(I), "align applies only to load instructions, "
4204 Assert(AlignMD->getNumOperands() == 1, "align takes one operand!", &I);
4206 Assert(CI && CI->getType()->isIntegerTy(64),
4209 Assert(isPowerOf2_64(Align),
4211 Assert(Align <= Value::MaximumAlignment,
4234 Assert(IF->isDeclaration(), "Intrinsic functions should never be defined!",
4250 Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
4252 Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg,
4257 Assert(!Intrinsic::matchIntrinsicVarArg(IsVarArg, TableRef),
4260 Assert(!Intrinsic::matchIntrinsicVarArg(IsVarArg, TableRef),
4264 Assert(TableRef.empty(), "Intrinsic has too few arguments!", IF);
4271 Assert(ExpectedName == IF->getName(),
4335 Assert(isa<MetadataAsValue>(Call.getArgOperand(0)),
4355 Assert(IsValidAlignment(MI->getDestAlignment()),
4359 Assert(IsValidAlignment(MTI->getSourceAlignment()),
4374 Assert(ElementSizeVal.isPowerOf2(),
4382 Assert((Length % ElementSize) == 0,
4392 Assert(IsValidAlignment(DstAlignment),
4396 Assert(IsValidAlignment(SrcAlignment),
4407 Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", Call);
4408 Assert(isa<Constant>(Call.getArgOperand(1)),
4411 Assert(!isa<ConstantPointerNull>(Call.getArgOperand(1)),
4418 Assert(Call.getParent()->getParent()->hasGC(),
4422 Assert(isa<Function>(Call.getArgOperand(1)->stripPointerCasts()),
4427 Assert(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2 &&
4432 Assert(isa<AllocaInst>(Call.getArgOperand(1)->stripPointerCasts()),
4437 Assert(BB == &BB->getParent()->front(),
4439 Assert(!SawFrameEscape,
4445 Assert(AI && AI->isStaticAlloca(),
4455 Assert(Fn && !Fn->isDeclaration(),
4468 Assert(!CI->isInlineAsm(),
4470 Assert(Call.getParent()->getParent()->hasGC(),
4476 Assert(Call.getParent()->getParent()->hasGC(),
4482 Assert(StatepointFn && StatepointFn->isDeclaration() &&
4492 Assert(Call.getType() == TargetFuncType->getReturnType(),
4497 Assert(Call.getNumArgOperands() == 3, "wrong number of arguments", Call);
4499 Assert(isa<PointerType>(Call.getType()->getScalarType()),
4513 Assert(InvokeBB, "safepoints should have unique landingpads",
4515 Assert(InvokeBB->getTerminator(), "safepoint block should be well formed",
4517 Assert(isStatepoint(InvokeBB->getTerminator()),
4524 Assert(isa<Instruction>(Token) && isStatepoint(cast<Instruction>(Token)),
4534 Assert(isa<ConstantInt>(Base),
4538 Assert(isa<ConstantInt>(Derived),
4544 Assert(0 <= BaseIndex && BaseIndex < (int)StatepointCall.arg_size(),
4546 Assert(0 <= DerivedIndex && DerivedIndex < (int)StatepointCall.arg_size(),
4574 Assert(GCParamArgsStart <= BaseIndex && BaseIndex < GCParamArgsEnd,
4578 Assert(GCParamArgsStart <= DerivedIndex && DerivedIndex < GCParamArgsEnd,
4588 Assert(Relocate.getDerivedPtr()->getType()->isPtrOrPtrVectorTy(),
4593 Assert(ResultType->isVectorTy() == DerivedType->isVectorTy(),
4596 Assert(
4605 Assert(isa<CatchPadInst>(Call.getArgOperand(0)),
4610 Assert(Call.getType()->isVectorTy(), "masked_load: must return a vector",
4617 Assert(Mask->getType()->isVectorTy(), "masked_load: mask must be vector",
4619 Assert(Alignment->getValue().isPowerOf2(),
4624 Assert(DataTy == Call.getType(),
4626 Assert(PassThru->getType() == DataTy,
4628 Assert(Mask->getType()->getVectorNumElements() ==
4638 Assert(Mask->getType()->isVectorTy(), "masked_store: mask must be vector",
4640 Assert(Alignment->getValue().isPowerOf2(),
4645 Assert(DataTy == Val->getType(),
4647 Assert(Mask->getType()->getVectorNumElements() ==
4654 Assert(isa<CallInst>(Call), "experimental_guard cannot be invoked", Call);
4662 Assert(isa<CallInst>(Call), "experimental_deoptimize cannot be invoked",
4731 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
4776 Assert((NumOperands == 3), "invalid arguments for constrained FP intrinsic",
4784 Assert((NumOperands == 3), "invalid arguments for constrained FP intrinsic",
4788 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
4797 Assert((NumOperands == 2), "invalid arguments for constrained FP intrinsic",
4801 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
4808 Assert((NumOperands == 5), "invalid arguments for constrained FP intrinsic",
4823 Assert((NumOperands == 4), "invalid arguments for constrained FP intrinsic",
4831 Assert((NumOperands == 2),
4837 Assert(Operand->getType()->isFPOrFPVectorTy(),
4844 Assert((NumSrcElem > 0) == Operand->getType()->isVectorTy(),
4846 Assert(Operand->getType()->isIntOrIntVectorTy(),
4849 Assert(NumSrcElem == OperandT->getNumElements(),
4859 Assert((NumOperands == 3),
4863 Assert((NumOperands == 2),
4872 Assert(OperandTy->isFPOrFPVectorTy(),
4874 Assert(ResultTy->isFPOrFPVectorTy(),
4876 Assert(OperandTy->isVectorTy() == ResultTy->isVectorTy(),
4881 Assert(OperandVecTy->getNumElements() == ResultVecTy->getNumElements(),
4886 Assert(OperandTy->getScalarSizeInBits() > ResultTy->getScalarSizeInBits(),
4890 Assert(OperandTy->getScalarSizeInBits() < ResultTy->getScalarSizeInBits(),
4907 Assert(FPI.getExceptionBehavior().hasValue(),
4911 Assert(FPI.getRoundingMode().hasValue(),
4974 Assert(Loc, "llvm.dbg." + Kind + " intrinsic requires a !dbg attachment",
5090 Assert(First->getCallingConv() == F->getCallingConv(),
5190 return Diagnostic->CheckFailed(Args...);