Lines Matching defs:Ty

499     Type *Ty = cast<PointerType>(CE->getType())->getElementType();
500 unsigned NumBits = Ty->getPrimitiveSizeInBits();
504 (isa<IntegerType>(Ty) || Ty->isFloatingPointTy())) {
523 if (Ty->isFloatingPointTy())
524 Res = ConstantExpr::getBitCast(Res, Ty);
755 Type *Ty = Ptr->getType();
756 assert(Ty->isPointerTy() && "Forming regular GEP of non-pointer type");
760 if (SequentialType *ATy = dyn_cast<SequentialType>(Ty)) {
774 // The element size is 0. This may be [0 x Ty]*, so just use a zero
785 Ty = ATy->getElementType();
786 } else if (StructType *STy = dyn_cast<StructType>(Ty)) {
799 NewIdxs.push_back(ConstantInt::get(Type::getInt32Ty(Ty->getContext()),
802 Ty = STy->getTypeAtIndex(ElIdx);
807 } while (Ty != ResultElementTy);
817 assert(C->getType()->getPointerElementType() == Ty &&
822 if (Ty != ResultElementTy)
1248 Type *Ty) {
1256 if (Ty->isHalfTy()) {
1260 return ConstantFP::get(Ty->getContext(), APF);
1262 if (Ty->isFloatTy())
1263 return ConstantFP::get(Ty->getContext(), APFloat((float)V));
1264 if (Ty->isDoubleTy())
1265 return ConstantFP::get(Ty->getContext(), APFloat(V));
1270 double V, double W, Type *Ty) {
1278 if (Ty->isHalfTy()) {
1282 return ConstantFP::get(Ty->getContext(), APF);
1284 if (Ty->isFloatTy())
1285 return ConstantFP::get(Ty->getContext(), APFloat((float)V));
1286 if (Ty->isDoubleTy())
1287 return ConstantFP::get(Ty->getContext(), APFloat(V));
1295 /// mode. The desired integer type Ty is used to select how many bits are
1300 bool roundTowardZero, Type *Ty) {
1302 unsigned ResultWidth = Ty->getIntegerBitWidth();
1315 return ConstantInt::get(Ty, UIntVal, /*isSigned=*/true);
1327 Type *Ty = F->getReturnType();
1341 if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy())
1355 if (Ty->isFloatTy())
1357 else if (Ty->isDoubleTy())
1369 return ConstantFoldFP(fabs, V, Ty);
1372 return ConstantFoldFP(log2, V, Ty);
1376 return ConstantFoldFP(log, V, Ty);
1380 return ConstantFoldFP(log10, V, Ty);
1384 return ConstantFoldFP(exp, V, Ty);
1388 return ConstantFoldFP(exp2, V, Ty);
1391 return ConstantFoldFP(floor, V, Ty);
1397 return ConstantFoldFP(acos, V, Ty);
1399 return ConstantFoldFP(asin, V, Ty);
1401 return ConstantFoldFP(atan, V, Ty);
1405 return ConstantFoldFP(ceil, V, Ty);
1407 return ConstantFoldFP(cos, V, Ty);
1409 return ConstantFoldFP(cosh, V, Ty);
1411 return ConstantFoldFP(cos, V, Ty);
1415 return ConstantFoldFP(exp, V, Ty);
1420 return ConstantFoldBinaryFP(pow, 2.0, V, Ty);
1425 return ConstantFoldFP(fabs, V, Ty);
1427 return ConstantFoldFP(floor, V, Ty);
1431 return ConstantFoldFP(log, V, Ty);
1433 return ConstantFoldFP(log10, V, Ty);
1435 (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) {
1437 return ConstantFoldFP(sqrt, V, Ty);
1439 return Constant::getNullValue(Ty);
1444 return ConstantFoldFP(sin, V, Ty);
1446 return ConstantFoldFP(sinh, V, Ty);
1448 return ConstantFoldFP(sqrt, V, Ty);
1450 return ConstantFoldFP(sqrt, V, Ty);
1452 return ConstantFoldFP(sin, V, Ty);
1456 return ConstantFoldFP(tan, V, Ty);
1458 return ConstantFoldFP(tanh, V, Ty);
1471 return ConstantInt::get(Ty, Op->getValue().countPopulation());
1504 /*roundTowardZero=*/false, Ty);
1512 /*roundTowardZero=*/true, Ty);
1527 if (!Ty->isHalfTy() && !Ty->isFloatTy() && !Ty->isDoubleTy())
1530 if (Ty->isFloatTy())
1532 else if (Ty->isDoubleTy())
1546 if (Ty->isFloatTy())
1548 else if (Ty->isDoubleTy())
1558 return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty);
1563 return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty);
1565 return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty);
1567 return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty);
1569 if (F->getIntrinsicID() == Intrinsic::powi && Ty->isHalfTy())
1573 if (F->getIntrinsicID() == Intrinsic::powi && Ty->isFloatTy())
1577 if (F->getIntrinsicID() == Intrinsic::powi && Ty->isDoubleTy())
1626 return UndefValue::get(Ty);
1627 return ConstantInt::get(Ty, Op1->getValue().countTrailingZeros());
1630 return UndefValue::get(Ty);
1631 return ConstantInt::get(Ty, Op1->getValue().countLeadingZeros());