Lines Matching defs:ConstantInt

77   if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
90 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
112 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
136 return ConstantInt::get(Ty, 0);
172 Constant *C = ConstantInt::get(Ty->getContext(), V);
187 return ConstantInt::get(Ty->getContext(),
229 if (ConstantInt *CI = dyn_cast<ConstantInt>(Elt))
290 if (!isa<ConstantInt>(CE->getOperand(1)) ||CE->getOperand(1)->isNullValue())
464 // ConstantInt
467 void ConstantInt::anchor() { }
469 ConstantInt::ConstantInt(IntegerType *Ty, const APInt& V)
474 ConstantInt *ConstantInt::getTrue(LLVMContext &Context) {
477 pImpl->TheTrueVal = ConstantInt::get(Type::getInt1Ty(Context), 1);
481 ConstantInt *ConstantInt::getFalse(LLVMContext &Context) {
484 pImpl->TheFalseVal = ConstantInt::get(Type::getInt1Ty(Context), 0);
488 Constant *ConstantInt::getTrue(Type *Ty) {
492 return ConstantInt::getTrue(Ty->getContext());
497 ConstantInt::getTrue(Ty->getContext()));
500 Constant *ConstantInt::getFalse(Type *Ty) {
504 return ConstantInt::getFalse(Ty->getContext());
509 ConstantInt::getFalse(Ty->getContext()));
513 // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap
518 ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
523 ConstantInt *&Slot = pImpl->IntConstants[DenseMapAPIntKeyInfo::KeyTy(V, ITy)];
524 if (!Slot) Slot = new ConstantInt(ITy, V);
528 Constant *ConstantInt::get(Type *Ty, uint64_t V, bool isSigned) {
538 ConstantInt *ConstantInt::get(IntegerType *Ty, uint64_t V,
543 ConstantInt *ConstantInt::getSigned(IntegerType *Ty, int64_t V) {
547 Constant *ConstantInt::getSigned(Type *Ty, int64_t V) {
551 Constant *ConstantInt::get(Type *Ty, const APInt& V) {
552 ConstantInt *C = get(Ty->getContext(), V);
554 "ConstantInt type doesn't match the type implied by its value!");
563 ConstantInt *ConstantInt::get(IntegerType* Ty, StringRef Str,
713 return getStructElement(cast<ConstantInt>(C)->getZExtValue());
746 return getStructElement(cast<ConstantInt>(C)->getZExtValue());
804 // Check to see if all of the elements are ConstantFP or ConstantInt and if
810 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
814 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
823 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
832 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
841 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
985 // Check to see if all of the elements are ConstantFP or ConstantInt and if
991 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
995 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
1004 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
1013 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
1022 if (ConstantInt *CI = dyn_cast<ConstantInt>(V[i]))
1062 if ((isa<ConstantFP>(V) || isa<ConstantInt>(V)) &&
1095 ConstantInt *CI = dyn_cast<ConstantInt>(*OI);
1197 bool ConstantInt::isValueValidForType(Type *Ty, uint64_t Val) {
1207 bool ConstantInt::isValueValidForType(Type *Ty, int64_t Val) {
1340 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
1344 assert(C && isa<ConstantInt>(C) && "Not a vector of numbers!");
1345 return cast<ConstantInt>(C)->getValue();
1832 Constant *GEPIdx = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
1845 Constant *Zero = ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0);
1846 Constant *One = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
1854 return getOffsetOf(STy, ConstantInt::get(Type::getInt32Ty(STy->getContext()),
1862 ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0),
2205 return ConstantInt::get(Ty, 1);
2481 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
2581 return ConstantInt::get(getElementType(), getElementAsInteger(Elt));