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

Lines Matching defs:Assert

542 #define Assert(C, ...) \
552 Assert(I.getOperand(i) != nullptr, "Operand is null", &I);
570 Assert(!GV.isDeclaration() || GV.hasValidDeclarationLinkage(),
574 Assert(GO->getAlignment() <= Value::MaximumAlignment,
576 Assert(!GV.hasAppendingLinkage() || isa<GlobalVariable>(GV),
581 Assert(GVar && GVar->getValueType()->isArrayTy(),
586 Assert(!GV.hasComdat(), "Declaration may not be in a Comdat!", &GV);
589 Assert(!GV.isDSOLocal(),
592 Assert((GV.isDeclaration() && GV.hasExternalLinkage()) ||
598 Assert(GV.isDSOLocal(),
625 Assert(GV.getInitializer()->getType() == GV.getValueType(),
632 Assert(GV.getInitializer()->isNullValue(),
634 Assert(!GV.isConstant(), "'common' global may not be marked constant!",
636 Assert(!GV.hasComdat(), "'common' global may not be in a Comdat!", &GV);
642 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(),
651 Assert(STy &&
656 Assert(STy->getNumElements() == 3,
660 Assert(ETy->isPointerTy() &&
668 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(),
673 Assert(PTy, "wrong type for intrinsic global variable", &GV);
677 Assert(InitArray, "wrong initalizer for intrinsic global variable",
681 Assert(isa<GlobalVariable>(V) || isa<Function>(V) ||
684 Assert(V->hasName(), "members of llvm.used must be named", V);
705 Assert(!isa<ScalableVectorType>(GV.getValueType()),
728 Assert(!GV->isDeclarationForLinker(), "Alias must point to a definition",
732 Assert(Visited.insert(GA2).second, "Aliases cannot form a cycle", &GA);
734 Assert(!GA2->isInterposable(), "Alias cannot point to an interposable alias",
756 Assert(GlobalAlias::isValidLinkage(GA.getLinkage()),
761 Assert(Aliasee, "Aliasee cannot be NULL!", &GA);
762 Assert(GA.getType() == Aliasee->getType(),
765 Assert(isa<GlobalValue>(Aliasee) || isa<ConstantExpr>(Aliasee),
812 Assert(!isa<LocalAsMetadata>(Op), "Invalid operand for global metadata!",
827 Assert(!MD.isTemporary(), "Expected no forward declarations!", &MD);
828 Assert(MD.isResolved(), "All nodes should be resolved!", &MD);
832 Assert(MD.getValue(), "Expected valid value", &MD);
833 Assert(!MD.getValue()->getType()->isMetadataTy(),
840 Assert(F, "function-local metadata used outside a function", L);
846 Assert(I->getParent(), "function-local metadata not in basic block", L, I);
854 Assert(ActualF == F, "function-local metadata used in wrong function", L);
1282 // Assert only if the global variable is not an extern
1353 Assert(!GV->hasPrivateLinkage(),
1365 Assert(N->getNumOperands() == 1,
1367 Assert(dyn_cast_or_null<MDString>(N->getOperand(0)),
1383 Assert(N->getNumOperands() == 1,
1385 Assert(dyn_cast_or_null<MDString>(N->getOperand(0)),
1429 Assert(Op->getNumOperands() == 3,
1433 Assert(
1437 Assert(false,
1442 Assert(ID, "invalid ID operand in module flag (expected metadata string)",
1454 Assert(mdconst::dyn_extract_or_null<ConstantInt>(Op->getOperand(2)),
1464 Assert(Value && Value->getNumOperands() == 2,
1467 Assert(isa<MDString>(Value->getOperand(0)),
1481 Assert(isa<MDNode>(Op->getOperand(2)),
1492 Assert(Inserted,
1499 Assert(Value, "wchar_size metadata requires constant integer argument");
1506 Assert(M.getNamedMetadata("llvm.linker.options"),
1513 Assert(Value,
1528 Assert(F && isa<Function>(F->getValue()), "expected a Function or null",
1532 Assert(Node && Node->getNumOperands() == 3, "expected a MDNode triple", MDO);
1536 Assert(Count && Count->getType()->isIntegerTy(),
1642 Assert(Attrs.getNumAttributes() == 1,
1655 Assert(AttrCount <= 1,
1660 Assert(!(Attrs.hasAttribute(Attribute::InAlloca) &&
1666 Assert(!(Attrs.hasAttribute(Attribute::StructRet) &&
1672 Assert(!(Attrs.hasAttribute(Attribute::ZExt) &&
1678 Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
1684 Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
1690 Assert(!(Attrs.hasAttribute(Attribute::ReadOnly) &&
1696 Assert(!(Attrs.hasAttribute(Attribute::NoInline) &&
1703 Assert(Attrs.getByValType() == cast<PointerType>(Ty)->getElementType(),
1708 Assert(Attrs.getPreallocatedType() ==
1714 Assert(!AttrBuilder(Attrs).overlaps(IncompatibleAttrs),
1722 Assert(!Attrs.hasAttribute(Attribute::ByVal) &&
1730 Assert(!Attrs.hasAttribute(Attribute::SwiftError),
1735 Assert(!Attrs.hasAttribute(Attribute::ByVal),
1738 Assert(!Attrs.hasAttribute(Attribute::SwiftError),
1760 Assert((!RetAttrs.hasAttribute(Attribute::ByVal) &&
1775 Assert((!RetAttrs.hasAttribute(Attribute::ReadOnly) &&
1789 Assert(!ArgAttrs.hasAttribute(Attribute::ImmArg),
1796 Assert(!SawNest, "More than one parameter has attribute nest!", V);
1801 Assert(!SawReturned, "More than one parameter has attribute returned!",
1803 Assert(Ty->canLosslesslyBitCastTo(FT->getReturnType()),
1810 Assert(!SawSRet, "Cannot have multiple 'sret' parameters!", V);
1811 Assert(i == 0 || i == 1,
1817 Assert(!SawSwiftSelf, "Cannot have multiple 'swiftself' parameters!", V);
1822 Assert(!SawSwiftError, "Cannot have multiple 'swifterror' parameters!",
1828 Assert(i == FT->getNumParams() - 1,
1838 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1842 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1846 Assert(!(Attrs.hasFnAttribute(Attribute::ReadOnly) &&
1850 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1856 Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
1860 Assert(!(Attrs.hasFnAttribute(Attribute::NoInline) &&
1865 Assert(Attrs.hasFnAttribute(Attribute::NoInline),
1868 Assert(!Attrs.hasFnAttribute(Attribute::OptimizeForSize),
1871 Assert(!Attrs.hasFnAttribute(Attribute::MinSize),
1877 Assert(GV->hasGlobalUnnamedAddr(),
1942 Assert(MD->getNumOperands() >= 2,
1946 Assert(MD->getOperand(0) != nullptr, "first operand should not be null",
1948 Assert(isa<MDString>(MD->getOperand(0)),
1952 Assert(ProfName.equals("function_entry_count") ||
1959 Assert(MD->getOperand(1) != nullptr, "second operand should not be null",
1961 Assert(isa<ConstantAsMetadata>(MD->getOperand(1)),
1984 Assert(GV->getParent() == &M, "Referencing global in another module!",
2003 Assert(CastInst::castIsValid(Instruction::BitCast, CE->getOperand(0),
2015 Assert(
2033 Assert(!Call.doesNotAccessMemory() && !Call.onlyReadsMemory() &&
2042 Assert(NumPatchBytes >= 0,
2049 Assert(PT && PT->getElementType()->isFunctionTy(),
2054 Assert(NumCallArgs >= 0,
2060 Assert(NumCallArgs >= NumParams,
2064 Assert(TargetFuncType->getReturnType()->isVoidTy(),
2069 Assert(NumCallArgs == NumParams,
2074 Assert((Flags & ~(uint64_t)StatepointFlags::MaskAll) == 0,
2083 Assert(ArgType == ParamType,
2090 Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
2099 Assert(isa<ConstantInt>(NumTransitionArgsV),
2105 Assert(NumTransitionArgs >= 0,
2112 Assert(NumTransitionArgs == 0,
2117 Assert(isa<ConstantInt>(NumDeoptArgsV),
2122 Assert(NumDeoptArgs >= 0,
2130 Assert(NumDeoptArgs == 0,
2136 Assert(ExpectedNumArgs <= (int)Call.arg_size(),
2144 Assert(UserCall, "illegal use of statepoint token", Call, U);
2147 Assert(isa<GCRelocateInst>(UserCall) || isa<GCResultInst>(UserCall),
2152 Assert(UserCall->getArgOperand(0) == &Call,
2155 Assert(UserCall->getArgOperand(0) == &Call,
2175 Assert(MaxRecoveredIndex <= EscapedObjectCount,
2216 Assert(false, "EH pads can't handle each other's exceptions",
2245 Assert(&Context == &F.getContext(),
2248 Assert(!F.hasCommonLinkage(), "Functions may not have common linkage", &F);
2249 Assert(FT->getNumParams() == NumArgs,
2252 Assert(F.getReturnType()->isFirstClassType() ||
2256 Assert(!F.hasStructRetAttr() || F.getReturnType()->isVoidTy(),
2261 Assert(verifyAttributeCount(Attrs, FT->getNumParams()),
2273 Assert(!Attrs.hasFnAttribute(Attribute::Builtin),
2285 Assert(F.getReturnType()->isVoidTy(),
2293 Assert(!F.hasStructRetAttr(),
2301 Assert(!F.isVarArg(), "Calling convention does not support varargs or "
2310 Assert(Arg.getType() == FT->getParamType(i),
2313 Assert(Arg.getType()->isFirstClassType(),
2316 Assert(!Arg.getType()->isMetadataTy(),
2318 Assert(!Arg.getType()->isTokenTy(),
2330 Assert(!F.getReturnType()->isTokenTy(),
2343 Assert(Per->getParent() == F.getParent(),
2350 Assert(MDs.empty(), "unmaterialized function cannot have metadata", &F,
2359 Assert(I.first != LLVMContext::MD_prof,
2365 Assert(!F.hasPersonalityFn(),
2370 Assert(!isLLVMdotName, "llvm intrinsics cannot be defined!", &F);
2374 Assert(pred_empty(Entry),
2379 Assert(!BlockAddress::lookup(Entry)->isConstantUsed(),
2407 Assert(NumProfAttachments == 1,
2424 Assert(false, "Invalid user of intrinsic instruction!", U);
2452 Assert(Scope, "Failed to find DILocalScope", DL);
2486 Assert(BB.getTerminator(), "Basic Block does not have terminator!", &BB);
2496 Assert(PN.getNumIncomingValues() != 0,
2500 Assert(PN.getNumIncomingValues() == Preds.size(),
2518 Assert(i == 0 || Values[i].first != Values[i - 1].first ||
2526 Assert(Values[i].first == Preds[i],
2536 Assert(I.getParent() == &BB, "Instruction has bogus parent pointer!");
2542 Assert(&I == I.getParent()->getTerminator(),
2549 Assert(BI.getCondition()->getType()->isIntegerTy(1),
2559 Assert(N == 0,
2564 Assert(N == 1 && F->getReturnType() == RI.getOperand(0)->getType(),
2580 Assert(Case.getCaseValue()->getType() == SwitchTy,
2582 Assert(Constants.insert(Case.getCaseValue()).second,
2590 Assert(BI.getAddress()->getType()->isPointerTy(),
2593 Assert(BI.getDestination(i)->getType()->isLabelTy(),
2600 Assert(CBI.isInlineAsm(), "Callbr is currently only used for asm-goto!",
2603 Assert(CBI.getSuccessor(i)->getType()->isLabelTy(),
2606 Assert(i >= CBI.getNumArgOperands() || !isa<BasicBlock>(CBI.getOperand(i)),
2610 Assert(CBI.getOperand(i) != CBI.getOperand(j),
2619 Assert(ArgBBs.count(BB), "Indirect label missing from arglist.", &CBI);
2626 Assert(!SelectInst::areInvalidOperands(SI.getOperand(0), SI.getOperand(1),
2630 Assert(SI.getTrueValue()->getType() == SI.getType(),
2639 Assert(false, "User-defined operators should not live outside of a pass!", &I);
2651 Assert(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I);
2652 Assert(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I);
2653 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2655 Assert(SrcBitSize > DestBitSize, "DestTy too big for Trunc", &I);
2666 Assert(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I);
2667 Assert(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I);
2668 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2673 Assert(SrcBitSize < DestBitSize, "Type too small for ZExt", &I);
2687 Assert(SrcTy->isIntOrIntVectorTy(), "SExt only operates on integer", &I);
2688 Assert(DestTy->isIntOrIntVectorTy(), "SExt only produces an integer", &I);
2689 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2691 Assert(SrcBitSize < DestBitSize, "Type too small for SExt", &I);
2704 Assert(SrcTy->isFPOrFPVectorTy(), "FPTrunc only operates on FP", &I);
2705 Assert(DestTy->isFPOrFPVectorTy(), "FPTrunc only produces an FP", &I);
2706 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2708 Assert(SrcBitSize > DestBitSize, "DestTy too big for FPTrunc", &I);
2722 Assert(SrcTy->isFPOrFPVectorTy(), "FPExt only operates on FP", &I);
2723 Assert(DestTy->isFPOrFPVectorTy(), "FPExt only produces an FP", &I);
2724 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(),
2726 Assert(SrcBitSize < DestBitSize, "DestTy too small for FPExt", &I);
2739 Assert(SrcVec == DstVec,
2741 Assert(SrcTy->isIntOrIntVectorTy(),
2743 Assert(DestTy->isFPOrFPVectorTy(), "UIToFP result must be FP or FP vector",
2747 Assert(cast<VectorType>(SrcTy)->getElementCount() ==
2762 Assert(SrcVec == DstVec,
2764 Assert(SrcTy->isIntOrIntVectorTy(),
2766 Assert(DestTy->isFPOrFPVectorTy(), "SIToFP result must be FP or FP vector",
2770 Assert(cast<VectorType>(SrcTy)->getElementCount() ==
2785 Assert(SrcVec == DstVec,
2787 Assert(SrcTy->isFPOrFPVectorTy(), "FPToUI source must be FP or FP vector",
2789 Assert(DestTy->isIntOrIntVectorTy(),
2793 Assert(cast<VectorType>(SrcTy)->getElementCount() ==
2808 Assert(SrcVec == DstVec,
2810 Assert(SrcTy->isFPOrFPVectorTy(), "FPToSI source must be FP or FP vector",
2812 Assert(DestTy->isIntOrIntVectorTy(),
2816 Assert(cast<VectorType>(SrcTy)->getElementCount() ==
2828 Assert(SrcTy->isPtrOrPtrVectorTy(), "PtrToInt source must be pointer", &I);
2831 Assert(!DL.isNonIntegralPointerType(PTy),
2834 Assert(DestTy->isIntOrIntVectorTy(), "PtrToInt result must be integral", &I);
2835 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), "PtrToInt type mismatch",
2841 Assert(VSrc->getElementCount() == VDest->getElementCount(),
2853 Assert(SrcTy->isIntOrIntVectorTy(),
2855 Assert(DestTy->isPtrOrPtrVectorTy(), "IntToPtr result must be a pointer", &I);
2858 Assert(!DL.isNonIntegralPointerType(PTy),
2861 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), "IntToPtr type mismatch",
2866 Assert(VSrc->getElementCount() == VDest->getElementCount(),
2873 Assert(
2883 Assert(SrcTy->isPtrOrPtrVectorTy(), "AddrSpaceCast source must be a pointer",
2885 Assert(DestTy->isPtrOrPtrVectorTy(), "AddrSpaceCast result must be a pointer",
2887 Assert(SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace(),
2890 Assert(SrcVTy->getNumElements() ==
2903 Assert(&PN == &PN.getParent()->front() ||
2908 Assert(!PN.getType()->isTokenTy(), "PHI nodes cannot have token type!");
2913 Assert(PN.getType() == IncValue->getType(),
2923 Assert(Call.getCalledOperand()->getType()->isPointerTy(),
2927 Assert(FPTy->getElementType()->isFunctionTy(),
2930 Assert(FPTy->getElementType() == Call.getFunctionType(),
2937 Assert(Call.arg_size() >= FTy->getNumParams(),
2941 Assert(Call.arg_size() == FTy->getNumParams(),
2946 Assert(Call.getArgOperand(i)->getType() == FTy->getParamType(i),
2952 Assert(verifyAttributeCount(Attrs, Call.arg_size()),
2964 Assert(Callee && Callee->isSpeculatable(),
2969 Assert(Call.getCalledFunction()->getIntrinsicID() ==
2984 Assert(AI->isUsedWithInAlloca(),
2995 Assert(AI->isSwiftError(),
3000 Assert(ArgI,
3003 Assert(ArgI->hasSwiftErrorAttr(),
3011 Assert(Callee && Callee->hasParamAttribute(i, Attribute::ImmArg),
3018 Assert(isa<ConstantInt>(ArgVal) || isa<ConstantFP>(ArgVal),
3027 Assert(hasOB != isMustTail,
3053 Assert(!SawNest, "More than one parameter has attribute nest!", Call);
3058 Assert(!SawReturned, "More than one parameter has attribute returned!",
3060 Assert(Ty->canLosslesslyBitCastTo(FTy->getReturnType()),
3072 Assert(!ArgAttrs.hasAttribute(Attribute::StructRet),
3077 Assert(Idx == Call.arg_size() - 1,
3085 Assert(!ParamTy->isMetadataTy(),
3087 Assert(!ParamTy->isTokenTy(),
3094 Assert(!FTy->getReturnType()->isTokenTy(),
3111 Assert(!FoundDeoptBundle, "Multiple deopt operand bundles", Call);
3114 Assert(!FoundGCTransitionBundle, "Multiple gc-transition operand bundles",
3118 Assert(!FoundFuncletBundle, "Multiple funclet operand bundles", Call);
3120 Assert(BU.Inputs.size() == 1,
3122 Assert(isa<FuncletPadInst>(BU.Inputs.front()),
3126 Assert(!FoundCFGuardTargetBundle,
3129 Assert(BU.Inputs.size() == 1,
3132 Assert(!FoundPreallocatedBundle, "Multiple preallocated operand bundles",
3135 Assert(BU.Inputs.size() == 1,
3138 Assert(Input &&
3144 Assert(!FoundGCLiveBundle, "Multiple gc-live operand bundles",
3193 Assert(!CI.isInlineAsm(), "cannot use musttail call with inline asm", &CI);
3202 Assert(CallerTy->getNumParams() == CalleeTy->getNumParams(),
3206 Assert(
3211 Assert(CallerTy->isVarArg() == CalleeTy->isVarArg(),
3213 Assert(isTypeCongruent(CallerTy->getReturnType(), CalleeTy->getReturnType()),
3217 Assert(F->getCallingConv() == CI.getCallingConv(),
3227 Assert(CallerABIAttrs == CalleeABIAttrs,
3242 Assert(BI->getOperand(0) == RetVal,
3250 Assert(Ret, "musttail call must precede a ret with an optional bitcast",
3252 Assert(!Ret->getReturnValue() || Ret->getReturnValue() == RetVal,
3268 Assert(
3279 Assert(U.getType() == U.getOperand(0)->getType(),
3288 Assert(U.getType()->isFPOrFPVectorTy(),
3302 Assert(B.getOperand(0)->getType() == B.getOperand(1)->getType(),
3315 Assert(B.getType()->isIntOrIntVectorTy(),
3317 Assert(B.getType() == B.getOperand(0)->getType(),
3329 Assert(B.getType()->isFPOrFPVectorTy(),
3333 Assert(B.getType() == B.getOperand(0)->getType(),
3342 Assert(B.getType()->isIntOrIntVectorTy(),
3344 Assert(B.getType() == B.getOperand(0)->getType(),
3351 Assert(B.getType()->isIntOrIntVectorTy(),
3353 Assert(B.getType() == B.getOperand(0)->getType(),
3367 Assert(Op0Ty == Op1Ty,
3370 Assert(Op0Ty->isIntOrIntVectorTy() || Op0Ty->isPtrOrPtrVectorTy(),
3373 Assert(IC.isIntPredicate(),
3383 Assert(Op0Ty == Op1Ty,
3386 Assert(Op0Ty->isFPOrFPVectorTy(),
3389 Assert(FC.isFPPredicate(),
3396 Assert(
3403 Assert(InsertElementInst::isValidOperands(IE.getOperand(0), IE.getOperand(1),
3410 Assert(ShuffleVectorInst::isValidOperands(SV.getOperand(0), SV.getOperand(1),
3419 Assert(isa<PointerType>(TargetTy),
3421 Assert(GEP.getSourceElementType()->isSized(), "GEP into unsized type!", &GEP);
3424 Assert(all_of(
3429 Assert(ElTy, "Invalid indices for GEP pointer type!", &GEP);
3431 Assert(GEP.getType()->isPtrOrPtrVectorTy() &&
3439 Assert(
3447 Assert(IndexWidth == GEPWidth, "Invalid GEP index vector width", &GEP);
3449 Assert(IndexTy->isIntOrIntVectorTy(),
3455 Assert(GEP.getAddressSpace() == PTy->getAddressSpace(),
3471 Assert(NumOperands % 2 == 0, "Unfinished range!", Range);
3473 Assert(NumRanges >= 1, "It should have at least one range!", Range);
3479 Assert(Low, "The lower limit must be an integer!", Low);
3482 Assert(High, "The upper limit must be an integer!", High);
3483 Assert(High->getType() == Low->getType() && High->getType() == Ty,
3489 Assert(!CurRange.isEmptySet() && !CurRange.isFullSet(),
3492 Assert(CurRange.intersectWith(LastRange).isEmptySet(),
3494 Assert(LowV.sgt(LastRange.getLower()), "Intervals are not in order",
3496 Assert(!isContiguous(CurRange, LastRange), "Intervals are contiguous",
3507 Assert(FirstRange.intersectWith(LastRange).isEmptySet(),
3509 Assert(!isContiguous(FirstRange, LastRange), "Intervals are contiguous",
3516 Assert(Size >= 8, "atomic memory access' size must be byte-sized", Ty, I);
3517 Assert(!(Size & (Size - 1)),
3523 Assert(PTy, "Load operand must be a pointer.", &LI);
3525 Assert(LI.getAlignment() <= Value::MaximumAlignment,
3527 Assert(ElTy->isSized(), "loading unsized types is not allowed", &LI);
3529 Assert(LI.getOrdering() != AtomicOrdering::Release &&
3532 Assert(LI.getAlignment() != 0,
3534 Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
3540 Assert(LI.getSyncScopeID() == SyncScope::System,
3549 Assert(PTy, "Store operand must be a pointer.", &SI);
3551 Assert(ElTy == SI.getOperand(0)->getType(),
3553 Assert(SI.getAlignment() <= Value::MaximumAlignment,
3555 Assert(ElTy->isSized(), "storing unsized types is not allowed", &SI);
3557 Assert(SI.getOrdering() != AtomicOrdering::Acquire &&
3560 Assert(SI.getAlignment() != 0,
3562 Assert(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy(),
3568 Assert(SI.getSyncScopeID() == SyncScope::System,
3580 Assert(Call.paramHasAttr(Idx, Attribute::SwiftError),
3592 Assert(isa<LoadInst>(U) || isa<StoreInst>(U) || isa<CallInst>(U) ||
3599 Assert(StoreI->getOperand(1) == SwiftErrorVal,
3611 Assert(PTy->getAddressSpace() == DL.getAllocaAddrSpace(),
3614 Assert(AI.getAllocatedType()->isSized(&Visited),
3616 Assert(AI.getArraySize()->getType()->isIntegerTy(),
3618 Assert(AI.getAlignment() <= Value::MaximumAlignment,
3631 Assert(CXI.getSuccessOrdering() != AtomicOrdering::NotAtomic,
3633 Assert(CXI.getFailureOrdering() != AtomicOrdering::NotAtomic,
3635 Assert(CXI.getSuccessOrdering() != AtomicOrdering::Unordered,
3637 Assert(CXI.getFailureOrdering() != AtomicOrdering::Unordered,
3639 Assert(!isStrongerThan(CXI.getFailureOrdering(), CXI.getSuccessOrdering()),
3643 Assert(CXI.getFailureOrdering() != AtomicOrdering::Release &&
3648 Assert(PTy, "First cmpxchg operand must be a pointer.", &CXI);
3650 Assert(ElTy->isIntOrPtrTy(),
3653 Assert(ElTy == CXI.getOperand(1)->getType(),
3656 Assert(ElTy == CXI.getOperand(2)->getType(),
3662 Assert(RMWI.getOrdering() != AtomicOrdering::NotAtomic,
3664 Assert(RMWI.getOrdering() != AtomicOrdering::Unordered,
3668 Assert(PTy, "First atomicrmw operand must be a pointer.", &RMWI);
3671 Assert(ElTy->isIntegerTy() || ElTy->isFloatingPointTy(), "atomicrmw " +
3676 Assert(ElTy->isFloatingPointTy(), "atomicrmw " +
3681 Assert(ElTy->isIntegerTy(), "atomicrmw " +
3687 Assert(ElTy == RMWI.getOperand(1)->getType(),
3690 Assert(AtomicRMWInst::FIRST_BINOP <= Op && Op <= AtomicRMWInst::LAST_BINOP,
3697 Assert(Ordering == AtomicOrdering::Acquire ||
3708 Assert(ExtractValueInst::getIndexedType(EVI.getAggregateOperand()->getType(),
3716 Assert(ExtractValueInst::getIndexedType(IVI.getAggregateOperand()->getType(),
3737 Assert(BB != &F->getEntryBlock(), "EH pad cannot be in entry block.", &I);
3745 Assert(II && II->getUnwindDest() == BB && II->getNormalDest() != BB,
3754 Assert(BB->getUniquePredecessor() == CPI->getCatchSwitch()->getParent(),
3758 Assert(BB != CPI->getCatchSwitch()->getUnwindDest(),
3772 Assert(II->getUnwindDest() == BB && II->getNormalDest() != BB,
3780 Assert(FromPad != ToPadParent, "A cleanupret must exit its cleanup", CRI);
3784 Assert(false, "EH pad must be jumped to via an unwind edge", ToPad, TI);
3790 Assert(FromPad != ToPad,
3796 Assert(!isa<ConstantTokenNone>(FromPad),
3798 Assert(Seen.insert(FromPad).second,
3807 Assert(LPI.getNumClauses() > 0 || LPI.isCleanup(),
3815 Assert(LandingPadResultTy == LPI.getType(),
3821 Assert(F->hasPersonalityFn(),
3826 Assert(LPI.getParent()->getLandingPadInst() == &LPI,
3833 Assert(isa<PointerType>(Clause->getType()),
3836 Assert(LPI.isFilter(i), "Clause is neither catch nor filter!", &LPI);
3837 Assert(isa<ConstantArray>(Clause) || isa<ConstantAggregateZero>(Clause),
3846 Assert(RI.getFunction()->hasPersonalityFn(),
3852 Assert(LandingPadResultTy == RI.getValue()->getType(),
3864 Assert(F->hasPersonalityFn(),
3867 Assert(isa<CatchSwitchInst>(CPI.getParentPad()),
3873 Assert(BB->getFirstNonPHI() == &CPI,
3881 Assert(isa<CatchPadInst>(CatchReturn.getOperand(0)),
3892 Assert(F->hasPersonalityFn(),
3897 Assert(BB->getFirstNonPHI() == &CPI,
3902 Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad),
3917 Assert(Seen.insert(CurrentPad).second,
3946 Assert(isa<CatchReturnInst>(U), "Bogus funclet pad use", U);
3996 Assert(UnwindPad == FirstUnwindPad, "Unwind edges out of a funclet "
4058 Assert(SwitchUnwindPad == FirstUnwindPad,
4072 Assert(F->hasPersonalityFn(),
4078 Assert(BB->getFirstNonPHI() == &CatchSwitch,
4083 Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad),
4088 Assert(I->isEHPad() && !isa<LandingPadInst>(I),
4098 Assert(CatchSwitch.getNumHandlers() != 0,
4102 Assert(isa<CatchPadInst>(Handler->getFirstNonPHI()),
4111 Assert(isa<CleanupPadInst>(CRI.getOperand(0)),
4117 Assert(I->isEHPad() && !isa<LandingPadInst>(I),
4147 Assert(DT.dominates(Op, U),
4152 Assert(I.getType()->isPointerTy(), "dereferenceable, dereferenceable_or_null "
4154 Assert((isa<LoadInst>(I) || isa<IntToPtrInst>(I)),
4157 Assert(MD->getNumOperands() == 1, "dereferenceable, dereferenceable_or_null "
4160 Assert(CI && CI->getType()->isIntegerTy(64), "dereferenceable, "
4165 Assert(MD->getNumOperands() >= 2,
4169 Assert(MD->getOperand(0) != nullptr, "first operand should not be null", MD);
4170 Assert(isa<MDString>(MD->getOperand(0)),
4178 Assert(MD->getNumOperands() == 2 || MD->getNumOperands() == 3,
4196 Assert(MD->getNumOperands() == 1 + ExpectedNumOperands,
4201 Assert(MDO, "second operand should not be null", MD);
4202 Assert(mdconst::dyn_extract<ConstantInt>(MDO),
4212 Assert(BB, "Instruction not embedded in basic block!", &I);
4216 Assert(U != (User *)&I || !DT.isReachableFromEntry(BB),
4222 Assert(!I.getType()->isVoidTy() || !I.hasName(),
4227 Assert(I.getType()->isVoidTy() || I.getType()->isFirstClassType(),
4232 Assert(!I.getType()->isMetadataTy() || isa<CallInst>(I) || isa<InvokeInst>(I),
4240 Assert(Used->getParent() != nullptr,
4255 Assert(I.getOperand(i) != nullptr, "Instruction has null operand!", &I);
4260 Assert(false, "Instruction operands must be first-class values!", &I);
4266 Assert(!F->isIntrinsic() ||
4269 Assert(
4281 Assert(F->getParent() == &M, "Referencing function in another module!",
4284 Assert(OpBB->getParent() == BB->getParent(),
4287 Assert(OpArg->getParent() == BB->getParent(),
4290 Assert(GV->getParent() == &M, "Referencing global in another module!", &I,
4295 Assert(CBI && &CBI->getCalledOperandUse() == &I.getOperandUse(i),
4310 Assert(I.getType()->isFPOrFPVectorTy(),
4312 Assert(MD->getNumOperands() == 1, "fpmath takes one operand!", &I);
4316 Assert(&Accuracy.getSemantics() == &APFloat::IEEEsingle(),
4318 Assert(Accuracy.isFiniteNonZero() && !Accuracy.isNegative(),
4321 Assert(false, "invalid fpmath accuracy!", &I);
4326 Assert(isa<LoadInst>(I) || isa<CallInst>(I) || isa<InvokeInst>(I),
4332 Assert(I.getType()->isPointerTy(), "nonnull applies only to pointer types",
4334 Assert(isa<LoadInst>(I),
4350 Assert(I.getType()->isPointerTy(), "align applies only to pointer types",
4352 Assert(isa<LoadInst>(I), "align applies only to load instructions, "
4354 Assert(AlignMD->getNumOperands() == 1, "align takes one operand!", &I);
4356 Assert(CI && CI->getType()->isIntegerTy(64),
4359 Assert(isPowerOf2_64(Align),
4361 Assert(Align <= Value::MaximumAlignment,
4395 Assert(IF->isDeclaration(), "Intrinsic functions should never be defined!",
4411 Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
4413 Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg,
4418 Assert(!Intrinsic::matchIntrinsicVarArg(IsVarArg, TableRef),
4421 Assert(!Intrinsic::matchIntrinsicVarArg(IsVarArg, TableRef),
4425 Assert(TableRef.empty(), "Intrinsic has too few arguments!", IF);
4432 Assert(ExpectedName == IF->getName(),
4449 Assert(Elem.Tag->getKey() == "ignore" ||
4452 Assert(Elem.End - Elem.Begin <= 2, "to many arguments");
4458 Assert(Elem.End - Elem.Begin == 2,
4460 Assert(isa<ConstantInt>(Call.getOperand(Elem.Begin + 1)),
4463 Assert((Elem.End - Elem.Begin) == 0, "this attribute has no argument");
4465 Assert((Elem.End - Elem.Begin) == 1,
4476 Assert(GV && GV->isConstant() && GV->hasDefinitiveInitializer(),
4480 Assert(isa<ConstantStruct>(Init) || isa<ConstantArray>(Init),
4491 Assert(isa<MetadataAsValue>(Call.getArgOperand(0)),
4512 Assert(IsValidAlignment(MI->getDestAlignment()),
4516 Assert(IsValidAlignment(MTI->getSourceAlignment()),
4531 Assert(ElementSizeVal.isPowerOf2(),
4540 Assert(IsValidAlignment(DstAlignment),
4544 Assert(IsValidAlignment(SrcAlignment),
4551 Assert(NumArgs != nullptr,
4556 Assert(UseCall != nullptr,
4561 Assert(AllocArgIndex != nullptr,
4564 Assert(AllocArgIndexInt.sge(0) &&
4573 Assert(!FoundCall, "Can have at most one call corresponding to a "
4582 Assert(NumPreallocatedArgs != 0,
4585 Assert(NumArgs->equalsInt(NumPreallocatedArgs),
4599 Assert(PreallocatedBundle,
4602 Assert(PreallocatedBundle->Inputs.front().get() == &Call,
4611 Assert(Token && Token->getCalledFunction()->getIntrinsicID() ==
4615 Assert(Call.hasFnAttr(Attribute::Preallocated),
4622 Assert(Token && Token->getCalledFunction()->getIntrinsicID() ==
4634 Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", Call);
4635 Assert(isa<Constant>(Call.getArgOperand(1)),
4638 Assert(!isa<ConstantPointerNull>(Call.getArgOperand(1)),
4645 Assert(Call.getParent()->getParent()->hasGC(),
4649 Assert(isa<Function>(Call.getArgOperand(1)->stripPointerCasts()),
4654 Assert(cast<ConstantInt>(Call.getArgOperand(1))->getZExtValue() < 2 &&
4659 Assert(isa<AllocaInst>(Call.getArgOperand(1)->stripPointerCasts()),
4664 Assert(BB == &BB->getParent()->front(),
4666 Assert(!SawFrameEscape,
4672 Assert(AI && AI->isStaticAlloca(),
4682 Assert(Fn && !Fn->isDeclaration(),
4695 Assert(!CI->isInlineAsm(),
4697 Assert(Call.getParent()->getParent()->hasGC(),
4703 Assert(Call.getParent()->getParent()->hasGC(),
4709 Assert(StatepointFn && StatepointFn->isDeclaration() &&
4715 // Assert that result type matches wrapped callee.
4719 Assert(Call.getType() == TargetFuncType->getReturnType(),
4724 Assert(Call.getNumArgOperands() == 3, "wrong number of arguments", Call);
4726 Assert(isa<PointerType>(Call.getType()->getScalarType()),
4740 Assert(InvokeBB, "safepoints should have unique landingpads",
4742 Assert(InvokeBB->getTerminator(), "safepoint block should be well formed",
4744 Assert(isa<GCStatepointInst>(InvokeBB->getTerminator()),
4751 Assert(isa<GCStatepointInst>(Token),
4761 Assert(isa<ConstantInt>(Base),
4765 Assert(isa<ConstantInt>(Derived),
4773 Assert(BaseIndex < Opt->Inputs.size(),
4775 Assert(DerivedIndex < Opt->Inputs.size(),
4778 Assert(BaseIndex < StatepointCall.arg_size(),
4780 Assert(DerivedIndex < StatepointCall.arg_size(),
4785 Assert(StatepointCall.arg_size() > 0,
4787 Assert(isa<ConstantInt>(StatepointCall.getArgOperand(3)),
4791 Assert(StatepointCall.arg_size() > NumCallArgs + 5,
4793 Assert(isa<ConstantInt>(StatepointCall.getArgOperand(NumCallArgs + 5)),
4800 Assert(isa<ConstantInt>(StatepointCall.getArgOperand(DeoptArgsStart)),
4808 Assert(GCParamArgsStart <= BaseIndex && BaseIndex < GCParamArgsEnd,
4812 Assert(GCParamArgsStart <= DerivedIndex && DerivedIndex < GCParamArgsEnd,
4823 Assert(Relocate.getDerivedPtr()->getType()->isPtrOrPtrVectorTy(),
4828 Assert(ResultType->isVectorTy() == DerivedType->isVectorTy(),
4831 Assert(
4840 Assert(isa<CatchPadInst>(Call.getArgOperand(0)),
4845 Assert(Call.getType()->isVectorTy(), "get_active_lane_mask: must return a "
4848 Assert(ElemTy->isIntegerTy(1), "get_active_lane_mask: element type is not "
4853 Assert(Call.getType()->isVectorTy(), "masked_load: must return a vector",
4860 Assert(Mask->getType()->isVectorTy(), "masked_load: mask must be vector",
4862 Assert(Alignment->getValue().isPowerOf2(),
4867 Assert(DataTy == Call.getType(),
4869 Assert(PassThru->getType() == DataTy,
4871 Assert(cast<VectorType>(Mask->getType())->getElementCount() ==
4881 Assert(Mask->getType()->isVectorTy(), "masked_store: mask must be vector",
4883 Assert(Alignment->getValue().isPowerOf2(),
4888 Assert(DataTy == Val->getType(),
4890 Assert(cast<VectorType>(Mask->getType())->getElementCount() ==
4899 Assert(Alignment.isNullValue() || Alignment.isPowerOf2(),
4906 Assert(Alignment.isNullValue() || Alignment.isPowerOf2(),
4912 Assert(isa<CallInst>(Call), "experimental_guard cannot be invoked", Call);
4913 Assert(Call.countOperandBundlesOfType(LLVMContext::OB_deopt) == 1,
4920 Assert(isa<CallInst>(Call), "experimental_deoptimize cannot be invoked",
4922 Assert(Call.countOperandBundlesOfType(LLVMContext::OB_deopt) == 1,
4925 Assert(Call.getType() == Call.getFunction()->getReturnType(),
4930 Assert(RI,
4934 Assert(RI->getReturnValue() == &Call,
4947 Assert(Op1->getType()->isIntOrIntVectorTy(),
4950 Assert(Op2->getType()->isIntOrIntVectorTy(),
4965 Assert(Op1->getType()->isIntOrIntVectorTy(),
4968 Assert(Op2->getType()->isIntOrIntVectorTy(),
4973 Assert(Op3->getType()->getBitWidth() <= 32,
4978 Assert(
4983 Assert(Op3->getZExtValue() <= Op1->getType()->getScalarSizeInBits(),
4995 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
5002 Assert(Size % 16 == 0, "bswap must be an even number of bytes", &Call);
5055 Assert(ResultTy->getElementType()->isIntegerTy() ||
5059 Assert(ResultTy->getElementType() == Op0ElemTy,
5064 Assert(ResultTy->getElementType() == Op1ElemTy,
5068 Assert(ResultTy->getNumElements() ==
5073 Assert(Stride->getZExtValue() >= NumRows->getZExtValue(),
5117 Assert((FPI.getNumArgOperands() == NumOperands),
5125 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
5134 Assert(!ValTy->isVectorTy() && !ResultTy->isVectorTy(),
5142 Assert(CmpInst::isFPPredicate(Pred),
5151 Assert(Operand->getType()->isFPOrFPVectorTy(),
5158 Assert((NumSrcElem > 0) == Operand->getType()->isVectorTy(),
5160 Assert(Operand->getType()->isIntOrIntVectorTy(),
5163 Assert(NumSrcElem == OperandT->getNumElements(),
5174 Assert(Operand->getType()->isIntOrIntVectorTy(),
5181 Assert((NumSrcElem > 0) == Operand->getType()->isVectorTy(),
5183 Assert(Operand->getType()->isFPOrFPVectorTy(),
5186 Assert(NumSrcElem == OperandT->getNumElements(),
5198 Assert(OperandTy->isFPOrFPVectorTy(),
5200 Assert(ResultTy->isFPOrFPVectorTy(),
5202 Assert(OperandTy->isVectorTy() == ResultTy->isVectorTy(),
5207 Assert(OperandVecTy->getNumElements() == ResultVecTy->getNumElements(),
5212 Assert(OperandTy->getScalarSizeInBits() > ResultTy->getScalarSizeInBits(),
5216 Assert(OperandTy->getScalarSizeInBits() < ResultTy->getScalarSizeInBits(),
5232 Assert(FPI.getExceptionBehavior().hasValue(),
5235 Assert(FPI.getRoundingMode().hasValue(),
5298 Assert(Loc, "llvm.dbg." + Kind + " intrinsic requires a !dbg attachment",
5414 Assert(First->getCallingConv() == F->getCallingConv(),
5707 // to Assert that.