reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
1225 if (DstTy->isFloatingPointTy()) { 1228 CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_from_fp16, DstTy), 1248 if (SrcTy == DstTy) { 1259 if (auto DstPT = dyn_cast<llvm::PointerType>(DstTy)) { 1262 return Builder.CreateBitCast(Src, DstTy, "conv"); 1272 return Builder.CreateIntToPtr(IntResult, DstTy, "conv"); 1277 assert(isa<llvm::IntegerType>(DstTy) && "not ptr->int?"); 1278 return Builder.CreatePtrToInt(Src, DstTy, "conv"); 1290 unsigned NumElements = DstTy->getVectorNumElements(); 1294 if (isa<llvm::VectorType>(SrcTy) || isa<llvm::VectorType>(DstTy)) { 1297 unsigned DstSize = DstTy->getPrimitiveSizeInBits(); 1299 return Builder.CreateBitCast(Src, DstTy, "conv"); 1309 llvm::Type *DstElementTy = DstTy->getVectorElementType(); 1321 return Builder.CreateIntCast(Src, DstTy, false, "conv"); 1325 return Builder.CreateFPTrunc(Src, DstTy, "conv"); 1328 return Builder.CreateFPExt(Src, DstTy, "conv"); 1333 llvm::Type *ResTy = DstTy; 1342 EmitFloatConversionCheck(OrigSrc, OrigSrcType, Src, SrcType, DstType, DstTy, 1355 return Builder.CreateFPTrunc(Src, DstTy); 1357 DstTy = CGF.FloatTy; 1365 if (isa<llvm::IntegerType>(DstTy)) 1366 Res = Builder.CreateIntCast(Src, DstTy, InputSigned, "conv"); 1368 Res = Builder.CreateSIToFP(Src, DstTy, "conv"); 1370 Res = Builder.CreateUIToFP(Src, DstTy, "conv"); 1371 } else if (isa<llvm::IntegerType>(DstTy)) { 1374 Res = Builder.CreateFPToSI(Src, DstTy, "conv"); 1376 Res = Builder.CreateFPToUI(Src, DstTy, "conv"); 1378 assert(SrcTy->isFloatingPointTy() && DstTy->isFloatingPointTy() && 1380 if (DstTy->getTypeID() < SrcTy->getTypeID()) 1381 Res = Builder.CreateFPTrunc(Src, DstTy, "conv"); 1383 Res = Builder.CreateFPExt(Src, DstTy, "conv"); 1386 if (DstTy != ResTy) {