Home | History | Annotate | Download | only in IR

Lines Matching defs:ConstantInt

92   if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
107 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
129 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
151 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
173 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
198 return ConstantInt::get(Ty, 0);
236 Constant *C = ConstantInt::get(Ty->getContext(), V);
251 return ConstantInt::get(Ty->getContext(),
283 if (ConstantInt *CI = dyn_cast<ConstantInt>(Elt))
355 if (!isa<ConstantInt>(CE->getOperand(1)) ||CE->getOperand(1)->isNullValue())
498 // ConstantInt
501 void ConstantInt::anchor() { }
503 ConstantInt::ConstantInt(IntegerType *Ty, const APInt &V)
508 ConstantInt *ConstantInt::getTrue(LLVMContext &Context) {
511 pImpl->TheTrueVal = ConstantInt::get(Type::getInt1Ty(Context), 1);
515 ConstantInt *ConstantInt::getFalse(LLVMContext &Context) {
518 pImpl->TheFalseVal = ConstantInt::get(Type::getInt1Ty(Context), 0);
522 Constant *ConstantInt::getTrue(Type *Ty) {
526 return ConstantInt::getTrue(Ty->getContext());
531 ConstantInt::getTrue(Ty->getContext()));
534 Constant *ConstantInt::getFalse(Type *Ty) {
538 return ConstantInt::getFalse(Ty->getContext());
543 ConstantInt::getFalse(Ty->getContext()));
546 // Get a ConstantInt from an APInt.
547 ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
550 ConstantInt *&Slot = pImpl->IntConstants[V];
554 Slot = new ConstantInt(ITy, V);
560 Constant *ConstantInt::get(Type *Ty, uint64_t V, bool isSigned) {
570 ConstantInt *ConstantInt::get(IntegerType *Ty, uint64_t V, bool isSigned) {
574 ConstantInt *ConstantInt::getSigned(IntegerType *Ty, int64_t V) {
578 Constant *ConstantInt::getSigned(Type *Ty, int64_t V) {
582 Constant *ConstantInt::get(Type *Ty, const APInt& V) {
583 ConstantInt *C = get(Ty->getContext(), V);
585 "ConstantInt type doesn't match the type implied by its value!");
594 ConstantInt *ConstantInt::get(IntegerType* Ty, StringRef Str, uint8_t radix) {
599 void ConstantInt::destroyConstantImpl() {
600 llvm_unreachable("You can't ConstantInt->destroyConstantImpl()!");
737 llvm_unreachable("You can't ConstantInt->destroyConstantImpl()!");
755 return getStructElement(cast<ConstantInt>(C)->getZExtValue());
788 return getStructElement(cast<ConstantInt>(C)->getZExtValue());
824 if (auto *CI = dyn_cast<ConstantInt>(C))
850 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) {
918 // Check to see if all of the elements are ConstantFP or ConstantInt and if
1028 // Check to see if all of the elements are ConstantFP or ConstantInt and if
1041 if ((isa<ConstantFP>(V) || isa<ConstantInt>(V)) &&
1085 ConstantInt *CI = dyn_cast<ConstantInt>(*OI);
1189 bool ConstantInt::isValueValidForType(Type *Ty, uint64_t Val) {
1199 bool ConstantInt::isValueValidForType(Type *Ty, int64_t Val) {
1318 if (const ConstantInt *CI = dyn_cast<ConstantInt>(this))
1322 assert(C && isa<ConstantInt>(C) && "Not a vector of numbers!");
1323 return cast<ConstantInt>(C)->getValue();
1816 Constant *GEPIdx = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
1829 Constant *Zero = ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0);
1830 Constant *One = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
1838 return getOffsetOf(STy, ConstantInt::get(Type::getInt32Ty(STy->getContext()),
1846 ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0),
2232 return ConstantInt::get(Ty, 1);
2546 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
2646 return ConstantInt::get(getElementType(), getElementAsInteger(Elt));