reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

include/llvm/IR/Constants.h
  132   static Constant *get(Type* Ty, const APInt& V);

References

include/llvm/IR/IRBuilder.h
 1233     return CreateShl(LHS, ConstantInt::get(LHS->getType(), RHS), Name,
 1255     return CreateLShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact);
 1275     return CreateAShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact);
 1294     return CreateAnd(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
 1320     return CreateOr(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
 1341     return CreateXor(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
lib/Analysis/ConstantFolding.cpp
  128         return ConstantInt::get(DestTy, Result);
  738       return ConstantInt::get(Op0->getType(), Known0.getConstant());
  754         return ConstantInt::get(Op0->getType(), Offs1.zextOrTrunc(OpSize) -
  955         NewIdxs.push_back(ConstantInt::get(IntPtrTy, NewIdx));
 2190         return ConstantInt::get(Ty, C0->uadd_sat(*C1));
 2192         return ConstantInt::get(Ty, C0->sadd_sat(*C1));
 2200         return ConstantInt::get(Ty, C0->usub_sat(*C1));
 2202         return ConstantInt::get(Ty, C0->ssub_sat(*C1));
 2362       return ConstantInt::get(Ty, C1->lshr(LshrAmt));
 2364       return ConstantInt::get(Ty, C0->shl(ShlAmt));
 2365     return ConstantInt::get(Ty, C0->shl(ShlAmt) | C1->lshr(LshrAmt));
lib/Analysis/InlineCost.cpp
 1680   return cast<ConstantInt>(ConstantInt::get(IntPtrTy, Offset));
lib/Analysis/InstructionSimplify.cpp
  668   Constant *OffsetIntPtr = ConstantInt::get(IntPtrTy, Offset);
  977       Constant *PosDividendC = ConstantInt::get(Ty, C->abs());
  978       Constant *NegDividendC = ConstantInt::get(Ty, -C->abs());
  993       Constant *PosDivisorC = ConstantInt::get(Ty, C->abs());
  994       Constant *NegDivisorC = ConstantInt::get(Ty, -C->abs());
 5394       Result = ConstantInt::get(I->getType(), Known.getConstant());
lib/Analysis/LazyValueInfo.cpp
  961         return ConstantInt::get(A->getType(), A->getValue() + B->getValue());
lib/CodeGen/CodeGenPrepare.cpp
 3961       TPT.setOperand(ExtOpnd, OpIdx, ConstantInt::get(Ext->getType(), CstVal));
 6904         ConstantInt::get(GEPIIdx->getType(),
lib/CodeGen/GlobalISel/IRTranslator.cpp
  554       *ConstantInt::get(SValue.getType(), JTH.Last - JTH.First));
lib/FuzzMutate/OpDescriptor.cpp
   18     Cs.push_back(ConstantInt::get(IntTy, APInt::getMaxValue(W)));
   19     Cs.push_back(ConstantInt::get(IntTy, APInt::getMinValue(W)));
   20     Cs.push_back(ConstantInt::get(IntTy, APInt::getSignedMaxValue(W)));
   21     Cs.push_back(ConstantInt::get(IntTy, APInt::getSignedMinValue(W)));
   22     Cs.push_back(ConstantInt::get(IntTy, APInt::getOneBitSet(W, W / 2)));
lib/IR/MDBuilder.cpp
   88   return createRange(ConstantInt::get(Ty, Lo), ConstantInt::get(Ty, Hi));
   88   return createRange(ConstantInt::get(Ty, Lo), ConstantInt::get(Ty, Hi));
lib/IR/Metadata.cpp
  959         cast<ConstantInt>(ConstantInt::get(Ty, Union.getLower()));
  961         cast<ConstantInt>(ConstantInt::get(Ty, Union.getUpper()));
 1459       auto *NewOffsetMD = ConstantAsMetadata::get(ConstantInt::get(
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  956           ConstantAsMetadata::get(ConstantInt::get(I32Ty, Lower->getValue().zext(32))),
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
 1535   auto *BMI = ConstantInt::get(P->getType(), APInt::getLowBitsSet(32, IC));
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
  244   Constant *Mask = ConstantInt::get(I.getType(), MOps.Mask);
lib/Transforms/IPO/Attributor.cpp
 3578             ConstantInt::get(MallocCall->getOperand(0)->getType(), TotalSize);
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  842         ConstantInt::get(X->getType(), *C2 + C1->trunc(C2->getBitWidth()));
  905     return BinaryOperator::CreateXor(Op0, ConstantInt::get(Add.getType(), *C2));
 1095     return CallInst::Create(getUAddSat(), { X, ConstantInt::get(Ty, *C) });
 1903       Constant *NegDivC = ConstantInt::get(I.getType(), -(*DivC));
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  105     NewRHS = ConstantInt::get(I.getType(), C->byteSwap());
  177     return Builder.CreateICmp(Pred, V, ConstantInt::get(Ty, Hi));
  183       Builder.CreateSub(V, ConstantInt::get(Ty, Lo), V->getName() + ".off");
  184   Constant *HiMinusLo = ConstantInt::get(Ty, Hi - Lo);
  299   Y = ConstantInt::get(X->getType(), Mask);
  511     Value *NewMask = ConstantInt::get(BCst->getType(), BorD);
  512     Value *NewMaskedValue = ConstantInt::get(BCst->getType(), BandBxorDorE);
  837     Value *Or = Builder.CreateOr(X, ConstantInt::get(X->getType(), Xor));
  838     return Builder.CreateICmp(Pred, Or, ConstantInt::get(X->getType(), *C2));
  850     Value *Add = Builder.CreateAdd(X, ConstantInt::get(X->getType(), -(*C1)));
 1018   return Builder.CreateICmpULT(X, ConstantInt::get(X->getType(), HighestBit),
 1765       Constant *NewC = ConstantInt::get(I.getType(), *C & *XorC);
 1780       Value *And = Builder.CreateAnd(X, ConstantInt::get(I.getType(),
 1783       return BinaryOperator::CreateOr(And, ConstantInt::get(I.getType(),
 2246           Value *MaskC = ConstantInt::get(LAddC->getType(), ~DiffC);
 2491     return BinaryOperator::CreateXor(Or, ConstantInt::get(I.getType(), *CV));
 3104         Constant *NewC = ConstantInt::get(I.getType(), *C + *RHSC);
 3109         Constant *NewC = ConstantInt::get(I.getType(), *C + *RHSC);
 3116         Constant *NewC = ConstantInt::get(I.getType(), *C ^ *RHSC);
 3145             Value *FoldVal = ConstantInt::get(Opnd0->getType(), FoldConst);
lib/Transforms/InstCombine/InstCombineCalls.cpp
  405   auto ShiftAmt = ConstantInt::get(SVT, Count.zextOrTrunc(BitWidth));
 1002     Indexes[I] = ConstantInt::get(MaskEltTy, Index);
 2034                      IID, X, ConstantInt::get(Arg1->getType(), NewC)));
 2099         return replaceInstUsesWith(*SI, ConstantInt::get(Ty, Min));
 2104         return replaceInstUsesWith(*SI, ConstantInt::get(Ty, Max));
 2148                      IID, X, ConstantInt::get(II->getType(), NewVal)));
lib/Transforms/InstCombine/InstCombineCasts.cpp
  742       Value *And = Builder.CreateAnd(X, ConstantInt::get(SrcTy, MaskC));
  749       Value *And = Builder.CreateAnd(X, ConstantInt::get(SrcTy, MaskC));
  835           ConstantInt::get(DestTy, Cst->getValue().trunc(DestSize)));
  946                                         ConstantInt::get(ITy, UnknownBit));
 1133     Constant *C = ConstantInt::get(Res->getType(),
 1156       Constant *AndConst = ConstantInt::get(A->getType(), AndValue);
 1163       return BinaryOperator::CreateAnd(A, ConstantInt::get(A->getType(),
 1170                                        ConstantInt::get(Trunc->getType(),
lib/Transforms/InstCombine/InstCombineCompares.cpp
 1113     Constant *R = ConstantInt::get(X->getType(),
 1123                         ConstantInt::get(X->getType(), -C));
 1135                         ConstantInt::get(X->getType(), SMax - C));
 1146                       ConstantInt::get(X->getType(), SMax - (C - 1)));
 1553       return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), NewRHS));
 1598       return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), C ^ *XorC));
 1606       return new ICmpInst(Pred, X, ConstantInt::get(X->getType(), C ^ *XorC));
 1623                           ConstantInt::get(X->getType(), ~C));
 1627                           ConstantInt::get(X->getType(), ~C));
 1686         Cmp.setOperand(1, ConstantInt::get(And->getType(), NewCst));
 1688         And->setOperand(1, ConstantInt::get(And->getType(), NewAndCst));
 1773       Constant *ZextC1 = ConstantInt::get(WideType, C1.zext(WideScalarBits));
 1774       Constant *ZextC2 = ConstantInt::get(WideType, C2->zext(WideScalarBits));
 2051       return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC));
 2056       return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC));
 2065       return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC));
 2081       return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC));
 2086       return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC));
 2095       return new ICmpInst(Pred, X, ConstantInt::get(ShType, ShiftedC));
 2101     Constant *Mask = ConstantInt::get(
 2105     Constant *LShrC = ConstantInt::get(ShType, C.lshr(*ShiftAmt));
 2113     Constant *Mask = ConstantInt::get(
 2155         ConstantInt::get(TruncTy, C.ashr(*ShiftAmt).trunc(TypeBits - Amt));
 2202         return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC));
 2209         return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC));
 2217         return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC));
 2223         return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, ShiftedC));
 2242     return new ICmpInst(Pred, X, ConstantInt::get(ShrTy, C << ShAmtVal));
 2248     Constant *Mask = ConstantInt::get(ShrTy, Val);
 2250     return new ICmpInst(Pred, And, ConstantInt::get(ShrTy, C << ShAmtVal));
 2279   Constant *MaskC = ConstantInt::get(Ty, SignMask | (*DivisorC - 1));
 2291   return new ICmpInst(ICmpInst::ICMP_UGT, And, ConstantInt::get(Ty, SignMask));
 2310                         ConstantInt::get(Y->getType(), C2->udiv(C + 1)));
 2317                         ConstantInt::get(Y->getType(), C2->udiv(C)));
 2449                             ConstantInt::get(Div->getType(), LoBound));
 2453                             ConstantInt::get(Div->getType(), HiBound));
 2462                             ConstantInt::get(Div->getType(), LoBound));
 2466                             ConstantInt::get(Div->getType(), HiBound));
 2476       return new ICmpInst(Pred, X, ConstantInt::get(Div->getType(), LoBound));
 2485                             ConstantInt::get(Div->getType(), HiBound));
 2487                           ConstantInt::get(Div->getType(), HiBound));
 2513                         ConstantInt::get(Y->getType(), SubResult));
 2587       return new ICmpInst(Pred, X, ConstantInt::get(Ty, NewC));
 2595       return new ICmpInst(ICmpInst::ICMP_SLT, X, ConstantInt::get(Ty, Upper));
 2597       return new ICmpInst(ICmpInst::ICMP_SGE, X, ConstantInt::get(Ty, Lower));
 2600       return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantInt::get(Ty, Upper));
 2602       return new ICmpInst(ICmpInst::ICMP_UGE, X, ConstantInt::get(Ty, Lower));
 2809         Value *NewC = ConstantInt::get(EltTy, C->trunc(EltTy->getBitWidth()));
 3033     Cmp.setOperand(1, ConstantInt::get(Ty, C.byteSwap()));
 3058       Cmp.setOperand(1, ConstantInt::get(Ty, Mask2));
 3124                              II->getArgOperand(0), ConstantInt::get(Ty, Limit));
 3133                              II->getArgOperand(0), ConstantInt::get(Ty, Limit));
 3438   Value *T0 = Builder.CreateAdd(X, ConstantInt::get(XType, AddCst));
 3440   Value *T1 = Builder.CreateICmp(DstPred, T0, ConstantInt::get(XType, ICmpCst));
 3966           Constant *Mask = ConstantInt::get(
 5042                             ConstantInt::get(Op1->getType(), *CmpC - 1));
 5064                             ConstantInt::get(Op1->getType(), *CmpC + 1));
 5084                             ConstantInt::get(Op1->getType(), *CmpC - 1));
 5099                             ConstantInt::get(Op1->getType(), *CmpC + 1));
 5535                             ConstantInt::get(Op1->getType(), ~(*C)));
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  251                                         ConstantInt::get(Y->getType(), PosVal));
  707                                       ConstantInt::get(Ty, Product));
  717                                               ConstantInt::get(Ty, Quotient));
  725                                            ConstantInt::get(Ty, Quotient));
  743                                           ConstantInt::get(Ty, Quotient));
  751                                            ConstantInt::get(Ty, Quotient));
  976           X, ConstantInt::get(X->getType(), C2ShlC1));
 1102       Constant *NegC = ConstantInt::get(I.getType(), -(*Op1C));
 1412       I.setOperand(1, ConstantInt::get(I.getType(), -*Y));
lib/Transforms/InstCombine/InstCombineSelect.cpp
  177       V = Builder.CreateAnd(V, ConstantInt::get(SelType, AndMask));
  184       Constant *C = ConstantInt::get(SelType, TC);
  191       Constant *C = ConstantInt::get(SelType, FC);
  209     V = Builder.CreateAnd(V, ConstantInt::get(V->getType(), AndMask));
  446             Value *C = ConstantInt::get(OOp->getType(), CI);
  477             Value *C = ConstantInt::get(OOp->getType(), CI);
  659     V = Builder.CreateAnd(V, ConstantInt::get(V->getType(), C1));
  743         Intrinsic::uadd_sat, X, ConstantInt::get(X->getType(), *C));
  915     AdjustedRHS = ConstantInt::get(CmpRHS->getType(), *CmpC + 1);
  917     AdjustedRHS = ConstantInt::get(CmpRHS->getType(), *CmpC - 1);
 1992                                     ConstantInt::get(X->getType(), *C2 - *C1));
 1994                                      ConstantInt::get(X->getType(), *C1));
 2005                                       ConstantInt::get(X->getType(), Diff));
 2007                                        ConstantInt::get(X->getType(), *C1));
lib/Transforms/InstCombine/InstCombineShifts.cpp
  332     Value *Rem = Builder.CreateAnd(A, ConstantInt::get(I.getType(), *B - 1),
  511                                    ConstantInt::get(ShType, Mask));
  882       return BinaryOperator::CreateAnd(X, ConstantInt::get(Ty, Mask));
  962         ConstantInt::get(Ty, APInt::getSignMask(BitWidth)), X);
 1013         return BinaryOperator::CreateAnd(NewLShr, ConstantInt::get(Ty, Mask));
 1027         return BinaryOperator::CreateAnd(NewShl, ConstantInt::get(Ty, Mask));
 1032       return BinaryOperator::CreateAnd(X, ConstantInt::get(Ty, Mask));
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
   55   I->setOperand(OpNo, ConstantInt::get(Op->getType(), *C & Demanded));
  300           ConstantInt::get(I->getType(), NewMask & AndRHS->getValue());
  305           ConstantInt::get(I->getType(), NewMask & XorRHS->getValue());
lib/Transforms/InstCombine/InstructionCombining.cpp
 1219       Op = ConstantInt::get(CI->getType(), Quotient);
 3246         Constant *C = ConstantInt::get(Ty, Known.getConstant());
lib/Transforms/Instrumentation/MemorySanitizer.cpp
 2148           Elements.push_back(ConstantInt::get(EltTy, V2));
 2158         ShadowMul = ConstantInt::get(Ty, V2);
lib/Transforms/Scalar/ConstantHoisting.cpp
  628     Constant *Offset = Diff == 0 ? nullptr : ConstantInt::get(Ty, Diff);
lib/Transforms/Scalar/DeadStoreElimination.cpp
 1256                 ConstantInt::get(Earlier->getValueOperand()->getType(), Merged),
lib/Transforms/Scalar/Float2Int.cpp
  454       NewOperands.push_back(ConstantInt::get(ToTy, Val));
lib/Transforms/Scalar/Reassociate.cpp
 1190       Opnd, ConstantInt::get(Opnd->getType(), ConstOpnd), "and.ra",
 1415       Value *C = ConstantInt::get(Ty, ConstOpnd);
 1424       return ConstantInt::get(Ty, ConstOpnd);
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  850           Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize));
  911           Idx = Builder.CreateMul(Idx, ConstantInt::get(IntPtrTy, ElementSize));
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  617   Constant *Delta = ConstantInt::get(DeltaType, IndexOffset);
lib/Transforms/Utils/SimplifyCFG.cpp
 5628         cast<ConstantInt>(ConstantInt::get(Ty, Sub.lshr(ShiftC->getValue()))));
lib/Transforms/Utils/SimplifyLibCalls.cpp
 1747           Base, ConstantInt::get(B.getInt32Ty(), IntExpo), M, B);
tools/clang/lib/CodeGen/CGBuiltin.cpp
 1357         CGF.Builder.CreateAdd(llvm::ConstantInt::get(OpTy, IntMax),
 1377           UnsignedResult, llvm::ConstantInt::get(OpTy, IntMax));
 7093       Locality = llvm::ConstantInt::get(Int32Ty,
tools/clang/lib/CodeGen/CGExpr.cpp
 3695                 : llvm::ConstantInt::get(IntPtrTy, ConstLowerBound);
 3701                 : llvm::ConstantInt::get(IntPtrTy, ConstLength);
 3711         Idx = llvm::ConstantInt::get(IntPtrTy, ConstLength + ConstLowerBound);
 3735         Idx = llvm::ConstantInt::get(IntPtrTy, ConstLength);
tools/clang/lib/CodeGen/CGExprCXX.cpp
  760     numElements = llvm::ConstantInt::get(CGF.SizeTy,
  773       sizeWithoutCookie = llvm::ConstantInt::get(CGF.SizeTy, allocationSize);
  783       size = llvm::ConstantInt::get(CGF.SizeTy, allocationSize);
  811         = llvm::ConstantInt::get(numElementsType, threshold);
  866         llvm::ConstantInt::get(CGF.SizeTy, typeSizeMultiplier);
  889             llvm::ConstantInt::get(CGF.SizeTy, arraySizeMultiplier);
  905       llvm::Value *cookieSizeV = llvm::ConstantInt::get(CGF.SizeTy, cookieSize);
tools/clang/lib/CodeGen/CodeGenFunction.cpp
  555         llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(
tools/clang/lib/CodeGen/PatternInit.cpp
   41     return llvm::ConstantInt::get(
tools/llvm-stress/llvm-stress.cpp
  450         return PT->push_back(ConstantInt::get(
  453         return PT->push_back(ConstantInt::get(
tools/polly/lib/CodeGen/IslExprBuilder.cpp
  764   V = ConstantInt::get(T, APValue);