• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/llvm/lib/IR/

Lines Matching refs:Assert

539 #define Assert(C, ...) \
549 Assert(I.getOperand(i) != nullptr, "Operand is null", &I);
567 Assert(!GV.isDeclaration() || GV.hasValidDeclarationLinkage(),
570 Assert(GV.getAlignment() <= Value::MaximumAlignment,
572 Assert(!GV.hasAppendingLinkage() || isa<GlobalVariable>(GV),
577 Assert(GVar && GVar->getValueType()->isArrayTy(),
582 Assert(!GV.hasComdat(), "Declaration may not be in a Comdat!", &GV);
585 Assert(!GV.isDSOLocal(),
588 Assert((GV.isDeclaration() && GV.hasExternalLinkage()) ||
594 Assert(GV.isDSOLocal(),
599 Assert(GV.isDSOLocal(),
624 Assert(GV.getInitializer()->getType() == GV.getValueType(),
631 Assert(GV.getInitializer()->isNullValue(),
633 Assert(!GV.isConstant(), "'common' global may not be marked constant!",
635 Assert(!GV.hasComdat(), "'common' global may not be in a Comdat!", &GV);
641 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(),
650 Assert(STy &&
655 Assert(STy->getNumElements() == 3,
659 Assert(ETy->isPointerTy() &&
667 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(),
672 Assert(PTy, "wrong type for intrinsic global variable", &GV);
676 Assert(InitArray, "wrong initalizer for intrinsic global variable",
680 Assert(isa<GlobalVariable>(V) || isa<Function>(V) ||
683 Assert(V->hasName(), "members of llvm.used must be named", V);
705 Assert(!VTy->isScalable(), "Globals cannot contain scalable vectors", &GV);
727 Assert(!GV->isDeclarationForLinker(), "Alias must point to a definition",
731 Assert(Visited.insert(GA2).second, "Aliases cannot form a cycle", &GA);
733 Assert(!GA2->isInterposable(), "Alias cannot point to an interposable alias",
755 Assert(GlobalAlias::isValidLinkage(GA.getLinkage()),
760 Assert(Aliasee, "Aliasee cannot be NULL!", &GA);
761 Assert(GA.getType() == Aliasee->getType(),
764 Assert(isa<GlobalValue>(Aliasee) || isa<ConstantExpr>(Aliasee),
811 Assert(!isa<LocalAsMetadata>(Op), "Invalid operand for global metadata!",
824 Assert(!MD.isTemporary(), "Expected no forward declarations!", &MD);
825 Assert(MD.isResolved(), "All nodes should be resolved!", &MD);
829 Assert(MD.getValue(), "Expected valid value", &MD);
830 Assert(!MD.getValue()->getType()->isMetadataTy(),
837 Assert(F, "function-local metadata used outside a function", L);
843 Assert(I->getParent(), "function-local metadata not in basic block", L, I);
851 Assert(ActualF == F, "function-local metadata used in wrong function", L);
1322 Assert(!GV->hasPrivateLinkage(),
1334 Assert(N->getNumOperands() == 1,
1336 Assert(dyn_cast_or_null<MDString>(N->getOperand(0)),
1352 Assert(N->getNumOperands() == 1,
1354 Assert(dyn_cast_or_null<MDString>(N->getOperand(0)),
1398 Assert(Op->getNumOperands() == 3,
1402 Assert(
1406 Assert(false,
1411 Assert(ID, "invalid ID operand in module flag (expected metadata string)",
1423 Assert(mdconst::dyn_extract_or_null<ConstantInt>(Op->getOperand(2)),
1433 Assert(Value && Value->getNumOperands() == 2,
1436 Assert(isa<MDString>(Value->getOperand(0)),
1450 Assert(isa<MDNode>(Op->getOperand(2)),
1461 Assert(Inserted,
1468 Assert(Value, "wchar_size metadata requires constant integer argument");
1475 Assert(M.getNamedMetadata("llvm.linker.options"),
1490 Assert(F && isa<Function>(F->getValue()), "expected a Function or null",
1494 Assert(Node && Node->getNumOperands() == 3, "expected a MDNode triple", MDO);
1498 Assert(Count && Count->getType()->isIntegerTy(),
1594 Assert(Attrs.getNumAttributes() == 1,
1606 Assert(AttrCount <= 1, "Attributes 'byval', 'inalloca', 'inreg', 'nest', "
1610 Assert(!(Attrs.hasAttribute(Attribute::InAlloca) &&
1616 Assert(!(Attrs.hasAttribute(Attribute::StructRet) &&
1622 Assert(!(Attrs.hasAttribute(Attribute::ZExt) &&
1628 Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
1634 Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
1640 Assert(!(Attrs.hasAttribute(Attribute::ReadOnly) &&
1646 Assert(!(Attrs.hasAttribute(Attribute::NoInline) &&
1653 Assert(Attrs.getByValType() == cast<PointerType>(Ty)->getElementType(),
1658 Assert(!AttrBuilder(Attrs).overlaps(IncompatibleAttrs),
1666 Assert(!Attrs.hasAttribute(Attribute::ByVal) &&
1672 Assert(!Attrs.hasAttribute(Attribute::SwiftError),
1677 Assert(!Attrs.hasAttribute(Attribute::ByVal),
1680 Assert(!Attrs.hasAttribute(Attribute::SwiftError),
1702 Assert((!RetAttrs.hasAttribute(Attribute::ByVal) &&
1715 Assert((!RetAttrs.hasAttribute(Attribute::ReadOnly) &&
1729 Assert(!ArgAttrs.hasAttribute(Attribute::ImmArg),
1736 Assert(!SawNest, "More than one parameter has attribute nest!", V);
1741 Assert(!SawReturned, "More than one parameter has attribute returned!",
1743 Assert(Ty->canLosslesslyBitCastTo(FT->getReturnType()),
1750 Assert(!SawSRet, "Cannot have multiple 'sret' parameters!", V);
1751 Assert(i == 0 || i == 1,
1757 Assert(!SawSwiftSelf, "Cannot have multiple 'swiftself' parameters!", V);
1762 Assert(!SawSwiftError, "Cannot have multiple 'swifterror' parameters!",
1768 Assert(i == FT->getNumParams() - 1,
1778 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1782 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1786 Assert(!(Attrs.hasFnAttribute(Attribute::ReadOnly) &&
1790 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1796 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1800 Assert(!(Attrs.hasFnAttribute(Attribute::NoInline) &&
1805 Assert(Attrs.hasFnAttribute(Attribute::NoInline),
1808 Assert(!Attrs.hasFnAttribute(Attribute::OptimizeForSize),
1811 Assert(!Attrs.hasFnAttribute(Attribute::MinSize),
1817 Assert(GV->hasGlobalUnnamedAddr(),
1882 Assert(MD->getNumOperands() >= 2,
1886 Assert(MD->getOperand(0) != nullptr, "first operand should not be null",
1888 Assert(isa<MDString>(MD->getOperand(0)),
1892 Assert(ProfName.equals("function_entry_count") ||
1899 Assert(MD->getOperand(1) != nullptr, "second operand should not be null",
1901 Assert(isa<ConstantAsMetadata>(MD->getOperand(1)),
1924 Assert(GV->getParent() == &M, "Referencing global in another module!",
1943 Assert(CastInst::castIsValid(Instruction::BitCast, CE->getOperand(0),
1955 Assert(
1973 Assert(!Call.doesNotAccessMemory() && !Call.onlyReadsMemory() &&
1982 Assert(NumPatchBytes >= 0,
1989 Assert(PT && PT->getElementType()->isFunctionTy(),
1994 Assert(NumCallArgs >= 0,
2000 Assert(NumCallArgs >= NumParams,
2004 Assert(TargetFuncType->getReturnType()->isVoidTy(),
2009 Assert(NumCallArgs == NumParams,
2014 Assert((Flags & ~(uint64_t)StatepointFlags::MaskAll) == 0,
2023 Assert(ArgType == ParamType,
2030 Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
2039 Assert(isa<ConstantInt>(NumTransitionArgsV),
2045 Assert(NumTransitionArgs >= 0,
2050 Assert(isa<ConstantInt>(NumDeoptArgsV),
2055 Assert(NumDeoptArgs >= 0,
2062 Assert(ExpectedNumArgs <= (int)Call.arg_size(),
2070 Assert(UserCall, "illegal use of statepoint token", Call, U);
2073 Assert(isa<GCRelocateInst>(UserCall) || isa<GCResultInst>(UserCall),
2078 Assert(UserCall->getArgOperand(0) == &Call,
2081 Assert(UserCall->getArgOperand(0) == &Call,
2101 Assert(MaxRecoveredIndex <= EscapedObjectCount,
2142 Assert(false, "EH pads can't handle each other's exceptions",
2171 Assert(&Context == &F.getContext(),
2174 Assert(!F.hasCommonLinkage(), "Functions may not have common linkage", &F);
2175 Assert(FT->getNumParams() == NumArgs,
2178 Assert(F.getReturnType()->isFirstClassType() ||
2182 Assert(!F.hasStructRetAttr() || F.getReturnType()->isVoidTy(),
2187 Assert(verifyAttributeCount(Attrs, FT->getNumParams()),
2199 Assert(!Attrs.hasFnAttribute(Attribute::Builtin),
2211 Assert(F.getReturnType()->isVoidTy(),
2219 Assert(!F.hasStructRetAttr(),
2227 Assert(!F.isVarArg(), "Calling convention does not support varargs or "
2236 Assert(Arg.getType() == FT->getParamType(i),
2239 Assert(Arg.getType()->isFirstClassType(),
2242 Assert(!Arg.getType()->isMetadataTy(),
2244 Assert(!Arg.getType()->isTokenTy(),
2256 Assert(!F.getReturnType()->isTokenTy(),
2269 Assert(Per->getParent() == F.getParent(),
2276 Assert(MDs.empty(), "unmaterialized function cannot have metadata", &F,
2285 Assert(I.first != LLVMContext::MD_prof,
2291 Assert(!F.hasPersonalityFn(),
2296 Assert(!isLLVMdotName, "llvm intrinsics cannot be defined!", &F);
2300 Assert(pred_empty(Entry),
2305 Assert(!BlockAddress::lookup(Entry)->isConstantUsed(),
2331 Assert(NumProfAttachments == 1,
2348 Assert(false, "Invalid user of intrinsic instruction!", U);
2409 Assert(BB.getTerminator(), "Basic Block does not have terminator!", &BB);
2419 Assert(PN.getNumIncomingValues() != 0,
2423 Assert(PN.getNumIncomingValues() == Preds.size(),
2441 Assert(i == 0 || Values[i].first != Values[i - 1].first ||
2449 Assert(Values[i].first == Preds[i],
2459 Assert(I.getParent() == &BB, "Instruction has bogus parent pointer!");
2465 Assert(&I == I.getParent()->getTerminator(),
2472 Assert(BI.getCondition()->getType()->isIntegerTy(1),
2482 Assert(N == 0,
2487 Assert(N == 1 && F->getReturnType() == RI.getOperand(0)->getType(),
2503 Assert(Case.getCaseValue()->getType() == SwitchTy,
2505 Assert(Constants.insert(Case.getCaseValue()).second,
2513 Assert(BI.getAddress()->getType()->isPointerTy(),
2516 Assert(BI.getDestination(i)->getType()->isLabelTy(),
2523 Assert(CBI.isInlineAsm(), "Callbr is currently only used for asm-goto!",
2525 Assert(CBI.getType()->isVoidTy(), "Callbr return value is not supported!",
2528 Assert(CBI.getSuccessor(i)->getType()->isLabelTy(),
2531 Assert(i >= CBI.getNumArgOperands() || !isa<BasicBlock>(CBI.getOperand(i)),
2535 Assert(CBI.getOperand(i) != CBI.getOperand(j),
2544 Assert(ArgBBs.find(BB) != ArgBBs.end(),
2552 Assert(!SelectInst::areInvalidOperands(SI.getOperand(0), SI.getOperand(1),
2556 Assert(SI.getTrueValue()->getType() == SI.getType(),
2565 Assert(false, "User-defined operators should not live outside of a pass!", &I);
2577 Assert(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I);
2578 Assert(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I);
2579 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2581 Assert(SrcBitSize > DestBitSize, "DestTy too big for Trunc", &I);
2592 Assert(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I);
2593 Assert(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I);
2594 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2599 Assert(SrcBitSize < DestBitSize, "Type too small for ZExt", &I);
2613 Assert(SrcTy->isIntOrIntVectorTy(), "SExt only operates on integer", &I);
2614 Assert(DestTy->isIntOrIntVectorTy(), "SExt only produces an integer", &I);
2615 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2617 Assert(SrcBitSize < DestBitSize, "Type too small for SExt", &I);
2630 Assert(SrcTy->isFPOrFPVectorTy(), "FPTrunc only operates on FP", &I);
2631 Assert(DestTy->isFPOrFPVectorTy(), "FPTrunc only produces an FP", &I);
2632 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2634 Assert(SrcBitSize > DestBitSize, "DestTy too big for FPTrunc", &I);
2648 Assert(SrcTy->isFPOrFPVectorTy(), "FPExt only operates on FP", &I);
2649 Assert(DestTy->isFPOrFPVectorTy(), "FPExt only produces an FP", &I);
2650 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2652 Assert(SrcBitSize < DestBitSize, "DestTy too small for FPExt", &I);
2665 Assert(SrcVec == DstVec,
2667 Assert(SrcTy->isIntOrIntVectorTy(),
2669 Assert(DestTy->isFPOrFPVectorTy(), "UIToFP result must be FP or FP vector",
2673 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2688 Assert(SrcVec == DstVec,
2690 Assert(SrcTy->isIntOrIntVectorTy(),
2692 Assert(DestTy->isFPOrFPVectorTy(), "SIToFP result must be FP or FP vector",
2696 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2711 Assert(SrcVec == DstVec,
2713 Assert(SrcTy->isFPOrFPVectorTy(), "FPToUI source must be FP or FP vector",
2715 Assert(DestTy->isIntOrIntVectorTy(),
2719 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2734 Assert(SrcVec == DstVec,
2736 Assert(SrcTy->isFPOrFPVectorTy(), "FPToSI source must be FP or FP vector",
2738 Assert(DestTy->isIntOrIntVectorTy(),
2742 Assert(cast<VectorType>(SrcTy)->getNumElements() ==
2754 Assert(SrcTy->isPtrOrPtrVectorTy(), "PtrToInt source must be pointer", &I);
2757 Assert(!DL.isNonIntegralPointerType(PTy),
2760 Assert(DestTy->isIntOrIntVectorTy(), "PtrToInt result must be integral", &I);
2761 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), "PtrToInt type mismatch",
2767 Assert(VSrc->getNumElements() == VDest->getNumElements(),
2779 Assert(SrcTy->isIntOrIntVectorTy(),
2781 Assert(DestTy->isPtrOrPtrVectorTy(), "IntToPtr result must be a pointer", &I);
2784 Assert(!DL.isNonIntegralPointerType(PTy),
2787 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), "IntToPtr type mismatch",
2792 Assert(VSrc->getNumElements() == VDest->getNumElements(),
2799 Assert(
2809 Assert(SrcTy->isPtrOrPtrVectorTy(), "AddrSpaceCast source must be a pointer",
2811 Assert(DestTy->isPtrOrPtrVectorTy(), "AddrSpaceCast result must be a pointer",
2813 Assert(SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace(),
2816 Assert(SrcTy->getVectorNumElements() == DestTy->getVectorNumElements(),
2828 Assert(&PN == &PN.getParent()->front() ||
2833 Assert(!PN.getType()->isTokenTy(), "PHI nodes cannot have token type!");
2838 Assert(PN.getType() == IncValue->getType(),
2848 Assert(Call.getCalledValue()->getType()->isPointerTy(),
2852 Assert(FPTy->getElementType()->isFunctionTy(),
2855 Assert(FPTy->getElementType() == Call.getFunctionType(),
2862 Assert(Call.arg_size() >= FTy->getNumParams(),
2866 Assert(Call.arg_size() == FTy->getNumParams(),
2871 Assert(Call.getArgOperand(i)->getType() == FTy->getParamType(i),
2877 Assert(verifyAttributeCount(Attrs, Call.arg_size()),
2889 Assert(Callee && Callee->isSpeculatable(),
2902 Assert(AI->isUsedWithInAlloca(),
2913 Assert(AI->isSwiftError(),
2918 Assert(ArgI,
2921 Assert(ArgI->hasSwiftErrorAttr(),
2929 Assert(Callee && Callee->hasParamAttribute(i, Attribute::ImmArg),
2936 Assert(isa<ConstantInt>(ArgVal) || isa<ConstantFP>(ArgVal),
2960 Assert(!SawNest, "More than one parameter has attribute nest!", Call);
2965 Assert(!SawReturned, "More than one parameter has attribute returned!",
2967 Assert(Ty->canLosslesslyBitCastTo(FTy->getReturnType()),
2979 Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
2984 Assert(Idx == Call.arg_size() - 1,
2992 Assert(!ParamTy->isMetadataTy(),
2994 Assert(!ParamTy->isTokenTy(),
3001 Assert(!FTy->getReturnType()->isTokenTy(),
3016 Assert(!FoundDeoptBundle, "Multiple deopt operand bundles", Call);
3019 Assert(!FoundGCTransitionBundle, "Multiple gc-transition operand bundles",
3023 Assert(!FoundFuncletBundle, "Multiple funclet operand bundles", Call);
3025 Assert(BU.Inputs.size() == 1,
3027 Assert(isa<FuncletPadInst>(BU.Inputs.front()),
3031 Assert(!FoundCFGuardTargetBundle,
3034 Assert(BU.Inputs.size() == 1,
3080 Assert(!CI.isInlineAsm(), "cannot use musttail call with inline asm", &CI);
3089 Assert(CallerTy->getNumParams() == CalleeTy->getNumParams(),
3093 Assert(
3098 Assert(CallerTy->isVarArg() == CalleeTy->isVarArg(),
3100 Assert(isTypeCongruent(CallerTy->getReturnType(), CalleeTy->getReturnType()),
3104 Assert(F->getCallingConv() == CI.getCallingConv(),
3114 Assert(CallerABIAttrs == CalleeABIAttrs,
3129 Assert(BI->getOperand(0) == RetVal,
3137 Assert(Ret, "musttail call must precede a ret with an optional bitcast",
3139 Assert(!Ret->getReturnValue() || Ret->getReturnValue() == RetVal,
3155 Assert(
3166 Assert(U.getType() == U.getOperand(0)->getType(),
3175 Assert(U.getType()->isFPOrFPVectorTy(),
3189 Assert(B.getOperand(0)->getType() == B.getOperand(1)->getType(),
3202 Assert(B.getType()->isIntOrIntVectorTy(),
3204 Assert(B.getType() == B.getOperand(0)->getType(),
3216 Assert(B.getType()->isFPOrFPVectorTy(),
3220 Assert(B.getType() == B.getOperand(0)->getType(),
3229 Assert(B.getType()->isIntOrIntVectorTy(),
3231 Assert(B.getType() == B.getOperand(0)->getType(),
3238 Assert(B.getType()->isIntOrIntVectorTy(),
3240 Assert(B.getType() == B.getOperand(0)->getType(),
3254 Assert(Op0Ty == Op1Ty,
3257 Assert(Op0Ty->isIntOrIntVectorTy() || Op0Ty->isPtrOrPtrVectorTy(),
3260 Assert(IC.isIntPredicate(),
3270 Assert(Op0Ty == Op1Ty,
3273 Assert(Op0Ty->isFPOrFPVectorTy(),
3276 Assert(FC.isFPPredicate(),
3283 Assert(
3290 Assert(InsertElementInst::isValidOperands(IE.getOperand(0), IE.getOperand(1),
3297 Assert(ShuffleVectorInst::isValidOperands(SV.getOperand(0), SV.getOperand(1),
3306 Assert(isa<PointerType>(TargetTy),
3308 Assert(GEP.getSourceElementType()->isSized(), "GEP into unsized type!", &GEP);
3311 Assert(all_of(
3316 Assert(ElTy, "Invalid indices for GEP pointer type!", &GEP);
3318 Assert(GEP.getType()->isPtrOrPtrVectorTy() &&
3326 Assert(GEPWidth == GEP.getPointerOperandType()->getVectorNumElements(),
3332 Assert(IndexWidth == GEPWidth, "Invalid GEP index vector width", &GEP);
3334 Assert(IndexTy->isIntOrIntVectorTy(),
3340 Assert(GEP.getAddressSpace() == PTy->getAddressSpace(),
3356 Assert(NumOperands % 2 == 0, "Unfinished range!", Range);
3358 Assert(NumRanges >= 1, "It should have at least one range!", Range);
3364 Assert(Low, "The lower limit must be an integer!", Low);
3367 Assert(High, "The upper limit must be an integer!", High);
3368 Assert(High->getType() == Low->getType() && High->getType() == Ty,
3374 Assert(!CurRange.isEmptySet() && !CurRange.isFullSet(),
3377 Assert(CurRange.intersectWith(LastRange).isEmptySet(),
3379 Assert(LowV.sgt(LastRange.getLower()), "Intervals are not in order",
3381 Assert(!isContiguous(CurRange, LastRange), "Intervals are contiguous",
3392 Assert(FirstRange.intersectWith(LastRange).isEmptySet(),
3394 Assert(!isContiguous(FirstRange, LastRange), "Intervals are contiguous",
3401 Assert(Size >= 8, "atomic memory access' size must be byte-sized", Ty, I);
3402 Assert(!(Size & (Size - 1)),
3408 Assert(PTy, "Load operand must be a pointer.", &LI);
3410 Assert(LI.getAlignment() <= Value::MaximumAlignment,
3412 Assert(ElTy->isSized(), "loading unsized types is not allowed", &LI);
3414 Assert(LI.getOrdering() != AtomicOrdering::Release &&
3417 Assert(LI.getAlignment() != 0,
3419 Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
3425 Assert(LI.getSyncScopeID() == SyncScope::System,
3434 Assert(PTy, "Store operand must be a pointer.", &SI);
3436 Assert(ElTy == SI.getOperand(0)->getType(),
3438 Assert(SI.getAlignment() <= Value::MaximumAlignment,
3440 Assert(ElTy->isSized(), "storing unsized types is not allowed", &SI);
3442 Assert(SI.getOrdering() != AtomicOrdering::Acquire &&
3445 Assert(SI.getAlignment() != 0,
3447 Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
3453 Assert(SI.getSyncScopeID() == SyncScope::System,
3465 Assert(Call.paramHasAttr(Idx, Attribute::SwiftError),
3477 Assert(isa<LoadInst>(U) || isa<StoreInst>(U) || isa<CallInst>(U) ||
3484 Assert(StoreI->getOperand(1) == SwiftErrorVal,
3496 Assert(PTy->getAddressSpace() == DL.getAllocaAddrSpace(),
3499 Assert(AI.getAllocatedType()->isSized(&Visited),
3501 Assert(AI.getArraySize()->getType()->isIntegerTy(),
3503 Assert(AI.getAlignment() <= Value::MaximumAlignment,
3516 Assert(CXI.getSuccessOrdering() != AtomicOrdering::NotAtomic,
3518 Assert(CXI.getFailureOrdering() != AtomicOrdering::NotAtomic,
3520 Assert(CXI.getSuccessOrdering() != AtomicOrdering::Unordered,
3522 Assert(CXI.getFailureOrdering() != AtomicOrdering::Unordered,
3524 Assert(!isStrongerThan(CXI.getFailureOrdering(), CXI.getSuccessOrdering()),
3528 Assert(CXI.getFailureOrdering() != AtomicOrdering::Release &&
3533 Assert(PTy, "First cmpxchg operand must be a pointer.", &CXI);
3535 Assert(ElTy->isIntOrPtrTy(),
3538 Assert(ElTy == CXI.getOperand(1)->getType(),
3541 Assert(ElTy == CXI.getOperand(2)->getType(),
3547 Assert(RMWI.getOrdering() != AtomicOrdering::NotAtomic,
3549 Assert(RMWI.getOrdering() != AtomicOrdering::Unordered,
3553 Assert(PTy, "First atomicrmw operand must be a pointer.", &RMWI);
3556 Assert(ElTy->isIntegerTy() || ElTy->isFloatingPointTy(), "atomicrmw " +
3561 Assert(ElTy->isFloatingPointTy(), "atomicrmw " +
3566 Assert(ElTy->isIntegerTy(), "atomicrmw " +
3572 Assert(ElTy == RMWI.getOperand(1)->getType(),
3575 Assert(AtomicRMWInst::FIRST_BINOP <= Op && Op <= AtomicRMWInst::LAST_BINOP,
3582 Assert(Ordering == AtomicOrdering::Acquire ||
3593 Assert(ExtractValueInst::getIndexedType(EVI.getAggregateOperand()->getType(),
3601 Assert(ExtractValueInst::getIndexedType(IVI.getAggregateOperand()->getType(),
3622 Assert(BB != &F->getEntryBlock(), "EH pad cannot be in entry block.", &I);
3630 Assert(II && II->getUnwindDest() == BB && II->getNormalDest() != BB,
3639 Assert(BB->getUniquePredecessor() == CPI->getCatchSwitch()->getParent(),
3643 Assert(BB != CPI->getCatchSwitch()->getUnwindDest(),
3657 Assert(II->getUnwindDest() == BB && II->getNormalDest() != BB,
3665 Assert(FromPad != ToPadParent, "A cleanupret must exit its cleanup", CRI);
3669 Assert(false, "EH pad must be jumped to via an unwind edge", ToPad, TI);
3675 Assert(FromPad != ToPad,
3681 Assert(!isa<ConstantTokenNone>(FromPad),
3683 Assert(Seen.insert(FromPad).second,
3692 Assert(LPI.getNumClauses() > 0 || LPI.isCleanup(),
3700 Assert(LandingPadResultTy == LPI.getType(),
3706 Assert(F->hasPersonalityFn(),
3711 Assert(LPI.getParent()->getLandingPadInst() == &LPI,
3718 Assert(isa<PointerType>(Clause->getType()),
3721 Assert(LPI.isFilter(i), "Clause is neither catch nor filter!", &LPI);
3722 Assert(isa<ConstantArray>(Clause) || isa<ConstantAggregateZero>(Clause),
3731 Assert(RI.getFunction()->hasPersonalityFn(),
3737 Assert(LandingPadResultTy == RI.getValue()->getType(),
3749 Assert(F->hasPersonalityFn(),
3752 Assert(isa<CatchSwitchInst>(CPI.getParentPad()),
3758 Assert(BB->getFirstNonPHI() == &CPI,
3766 Assert(isa<CatchPadInst>(CatchReturn.getOperand(0)),
3777 Assert(F->hasPersonalityFn(),
3782 Assert(BB->getFirstNonPHI() == &CPI,
3787 Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad),
3802 Assert(Seen.insert(CurrentPad).second,
3831 Assert(isa<CatchReturnInst>(U), "Bogus funclet pad use", U);
3881 Assert(UnwindPad == FirstUnwindPad, "Unwind edges out of a funclet "
3943 Assert(SwitchUnwindPad == FirstUnwindPad,
3957 Assert(F->hasPersonalityFn(),
3963 Assert(BB->getFirstNonPHI() == &CatchSwitch,
3968 Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad),
3973 Assert(I->isEHPad() && !isa<LandingPadInst>(I),
3983 Assert(CatchSwitch.getNumHandlers() != 0,
3987 Assert(isa<CatchPadInst>(Handler->getFirstNonPHI()),
3996 Assert(isa<CleanupPadInst>(CRI.getOperand(0)),
4002 Assert(I->isEHPad() && !isa<LandingPadInst>(I),
4032 Assert(DT.dominates(Op, U),
4037 Assert(I.getType()->isPointerTy(), "dereferenceable, dereferenceable_or_null "
4039 Assert((isa<LoadInst>(I) || isa<IntToPtrInst>(I)),
4042 Assert(MD->getNumOperands() == 1, "dereferenceable, dereferenceable_or_null "
4045 Assert(CI && CI->getType()->isIntegerTy(64), "dereferenceable, "
4050 Assert(MD->getNumOperands() >= 2,
4054 Assert(MD->getOperand(0) != nullptr, "first operand should not be null", MD);
4055 Assert(isa<MDString>(MD->getOperand(0)),
4077 Assert(MD->getNumOperands() == 1 + ExpectedNumOperands,
4081 Assert(MDO, "second operand should not be null", MD);
4082 Assert(mdconst::dyn_extract<ConstantInt>(MDO),
4092 Assert(BB, "Instruction not embedded in basic block!", &I);
4096 Assert(U != (User *)&I || !DT.isReachableFromEntry(BB),
4102 Assert(!I.getType()->isVoidTy() || !I.hasName(),
4107 Assert(I.getType()->isVoidTy() || I.getType()->isFirstClassType(),
4112 Assert(!I.getType()->isMetadataTy() || isa<CallInst>(I) || isa<InvokeInst>(I),
4120 Assert(Used->getParent() != nullptr,
4135 Assert(I.getOperand(i) != nullptr, "Instruction has null operand!", &I);
4140 Assert(false, "Instruction operands must be first-class values!", &I);
4146 Assert(!F->isIntrinsic() ||
4149 Assert(
4161 Assert(F->getParent() == &M, "Referencing function in another module!",
4164 Assert(OpBB->getParent() == BB->getParent(),
4167 Assert(OpArg->getParent() == BB->getParent(),
4170 Assert(GV->getParent() == &M, "Referencing global in another module!", &I,
4175 Assert(CBI && &CBI->getCalledOperandUse() == &I.getOperandUse(i),
4190 Assert(I.getType()->isFPOrFPVectorTy(),
4192 Assert(MD->getNumOperands() == 1, "fpmath takes one operand!", &I);
4196 Assert(&Accuracy.getSemantics() == &APFloat::IEEEsingle(),
4198 Assert(Accuracy.isFiniteNonZero() && !Accuracy.isNegative(),
4201 Assert(false, "invalid fpmath accuracy!", &I);
4206 Assert(isa<LoadInst>(I) || isa<CallInst>(I) || isa<InvokeInst>(I),
4212 Assert(I.getType()->isPointerTy(), "nonnull applies only to pointer types",
4214 Assert(isa<LoadInst>(I),
4230 Assert(I.getType()->isPointerTy(), "align applies only to pointer types",
4232 Assert(isa<LoadInst>(I), "align applies only to load instructions, "
4234 Assert(AlignMD->getNumOperands() == 1, "align takes one operand!", &I);
4236 Assert(CI && CI->getType()->isIntegerTy(64),
4239 Assert(isPowerOf2_64(Align),
4241 Assert(Align <= Value::MaximumAlignment,
4264 Assert(IF->isDeclaration(), "Intrinsic functions should never be defined!",
4280 Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
4282 Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg,
4287 Assert(!Intrinsic::matchIntrinsicVarArg(IsVarArg, TableRef),
4290 Assert(!Intrinsic::matchIntrinsicVarArg(IsVarArg, TableRef),
4294 Assert(TableRef.empty(), "Intrinsic has too few arguments!", IF);
4301 Assert(ExpectedName == IF->getName(),
4321 Assert(GV && GV->isConstant() && GV->hasDefinitiveInitializer(),
4325 Assert(isa<ConstantStruct>(Init) || isa<ConstantArray>(Init),
4336 Assert(isa<MetadataAsValue>(Call.getArgOperand(0)),
4356 Assert(IsValidAlignment(MI->getDestAlignment()),
4360 Assert(IsValidAlignment(MTI->getSourceAlignment()),
4375 Assert(ElementSizeVal.isPowerOf2(),
4383 Assert((Length % ElementSize) == 0,
4393 Assert(IsValidAlignment(DstAlignment),
4397 Assert(IsValidAlignment(SrcAlignment),
4408 Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", Call);
4409 Assert(isa<Constant>(Call.getArgOperand(1)),
4412 Assert(!isa<ConstantPointerNull>(Call.getArgOperand(1)),
4419 Assert(Call.getParent()->getParent()->hasGC(),
4423 Assert(isa<Function>(Call.getArgOperand(1)->stripPointerCasts()),
4428 Assert(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2 &&
4433 Assert(isa<AllocaInst>(Call.getArgOperand(1)->stripPointerCasts()),
4438 Assert(BB == &BB->getParent()->front(),
4440 Assert(!SawFrameEscape,
4446 Assert(AI && AI->isStaticAlloca(),
4456 Assert(Fn && !Fn->isDeclaration(),
4469 Assert(!CI->isInlineAsm(),
4471 Assert(Call.getParent()->getParent()->hasGC(),
4477 Assert(Call.getParent()->getParent()->hasGC(),
4483 Assert(StatepointFn && StatepointFn->isDeclaration() &&
4489 // Assert that result type matches wrapped callee.
4493 Assert(Call.getType() == TargetFuncType->getReturnType(),
4498 Assert(Call.getNumArgOperands() == 3, "wrong number of arguments", Call);
4500 Assert(isa<PointerType>(Call.getType()->getScalarType()),
4514 Assert(InvokeBB, "safepoints should have unique landingpads",
4516 Assert(InvokeBB->getTerminator(), "safepoint block should be well formed",
4518 Assert(isStatepoint(InvokeBB->getTerminator()),
4525 Assert(isa<Instruction>(Token) && isStatepoint(cast<Instruction>(Token)),
4535 Assert(isa<ConstantInt>(Base),
4539 Assert(isa<ConstantInt>(Derived),
4545 Assert(0 <= BaseIndex && BaseIndex < (int)StatepointCall.arg_size(),
4547 Assert(0 <= DerivedIndex && DerivedIndex < (int)StatepointCall.arg_size(),
4552 Assert(StatepointCall.arg_size() > 0,
4554 Assert(isa<ConstantInt>(StatepointCall.getArgOperand(3)),
4558 Assert(StatepointCall.arg_size() > NumCallArgs + 5,
4560 Assert(isa<ConstantInt>(StatepointCall.getArgOperand(NumCallArgs + 5)),
4567 Assert(isa<ConstantInt>(StatepointCall.getArgOperand(DeoptArgsStart)),
4575 Assert(GCParamArgsStart <= BaseIndex && BaseIndex < GCParamArgsEnd,
4579 Assert(GCParamArgsStart <= DerivedIndex && DerivedIndex < GCParamArgsEnd,
4589 Assert(Relocate.getDerivedPtr()->getType()->isPtrOrPtrVectorTy(),
4594 Assert(ResultType->isVectorTy() == DerivedType->isVectorTy(),
4597 Assert(
4606 Assert(isa<CatchPadInst>(Call.getArgOperand(0)),
4611 Assert(Call.getType()->isVectorTy(), "masked_load: must return a vector",
4618 Assert(Mask->getType()->isVectorTy(), "masked_load: mask must be vector",
4620 Assert(Alignment->getValue().isPowerOf2(),
4625 Assert(DataTy == Call.getType(),
4627 Assert(PassThru->getType() == DataTy,
4629 Assert(Mask->getType()->getVectorNumElements() ==
4639 Assert(Mask->getType()->isVectorTy(), "masked_store: mask must be vector",
4641 Assert(Alignment->getValue().isPowerOf2(),
4646 Assert(DataTy == Val->getType(),
4648 Assert(Mask->getType()->getVectorNumElements() ==
4655 Assert(isa<CallInst>(Call), "experimental_guard cannot be invoked", Call);
4656 Assert(Call.countOperandBundlesOfType(LLVMContext::OB_deopt) == 1,
4663 Assert(isa<CallInst>(Call), "experimental_deoptimize cannot be invoked",
4665 Assert(Call.countOperandBundlesOfType(LLVMContext::OB_deopt) == 1,
4668 Assert(Call.getType() == Call.getFunction()->getReturnType(),
4673 Assert(RI,
4677 Assert(RI->getReturnValue() == &Call,
4690 Assert(Op1->getType()->isIntOrIntVectorTy(),
4693 Assert(Op2->getType()->isIntOrIntVectorTy(),
4706 Assert(Op1->getType()->isIntOrIntVectorTy(),
4709 Assert(Op2->getType()->isIntOrIntVectorTy(),
4714 Assert(Op3->getType()->getBitWidth() <= 32,
4719 Assert(
4724 Assert(Op3->getZExtValue() <= Op1->getType()->getScalarSizeInBits(),
4736 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
4779 Assert((FPI.getNumArgOperands() == NumOperands),
4787 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
4796 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
4804 Assert(CmpInst::isFPPredicate(Pred),
4813 Assert(Operand->getType()->isFPOrFPVectorTy(),
4820 Assert((NumSrcElem > 0) == Operand->getType()->isVectorTy(),
4822 Assert(Operand->getType()->isIntOrIntVectorTy(),
4825 Assert(NumSrcElem == OperandT->getNumElements(),
4836 Assert(Operand->getType()->isIntOrIntVectorTy(),
4843 Assert((NumSrcElem > 0) == Operand->getType()->isVectorTy(),
4845 Assert(Operand->getType()->isFPOrFPVectorTy(),
4848 Assert(NumSrcElem == OperandT->getNumElements(),
4860 Assert(OperandTy->isFPOrFPVectorTy(),
4862 Assert(ResultTy->isFPOrFPVectorTy(),
4864 Assert(OperandTy->isVectorTy() == ResultTy->isVectorTy(),
4869 Assert(OperandVecTy->getNumElements() == ResultVecTy->getNumElements(),
4874 Assert(OperandTy->getScalarSizeInBits() > ResultTy->getScalarSizeInBits(),
4878 Assert(OperandTy->getScalarSizeInBits() < ResultTy->getScalarSizeInBits(),
4894 Assert(FPI.getExceptionBehavior().hasValue(),
4897 Assert(FPI.getRoundingMode().hasValue(),
4960 Assert(Loc, "llvm.dbg." + Kind + " intrinsic requires a !dbg attachment",
5076 Assert(First->getCallingConv() == F->getCallingConv(),
5369 // to Assert that.