• Home
  • Raw
  • Download

Lines Matching refs:DstTy

141   Value *EmitConversionToBool(Value *Src, QualType DstTy);
147 llvm::Type *DstTy, SourceLocation Loc);
151 Value *EmitScalarConversion(Value *Src, QualType SrcTy, QualType DstTy,
154 Value *EmitScalarConversion(Value *Src, QualType SrcTy, QualType DstTy,
160 QualType SrcTy, QualType DstTy,
599 QualType DstType, llvm::Type *DstTy, SourceLocation Loc) { in EmitFloatConversionCheck() argument
636 if (isa<llvm::IntegerType>(DstTy)) { in EmitFloatConversionCheck()
756 llvm::Type *DstTy = ConvertType(DstType); in EmitScalarConversion() local
761 if (DstTy->isFloatingPointTy()) { in EmitScalarConversion()
764 CGF.CGM.getIntrinsic(llvm::Intrinsic::convert_from_fp16, DstTy), in EmitScalarConversion()
784 if (SrcTy == DstTy) in EmitScalarConversion()
790 if (isa<llvm::PointerType>(DstTy)) { in EmitScalarConversion()
793 return Builder.CreateBitCast(Src, DstTy, "conv"); in EmitScalarConversion()
803 return Builder.CreateIntToPtr(IntResult, DstTy, "conv"); in EmitScalarConversion()
808 assert(isa<llvm::IntegerType>(DstTy) && "not ptr->int?"); in EmitScalarConversion()
809 return Builder.CreatePtrToInt(Src, DstTy, "conv"); in EmitScalarConversion()
821 unsigned NumElements = DstTy->getVectorNumElements(); in EmitScalarConversion()
827 isa<llvm::VectorType>(DstTy)) in EmitScalarConversion()
828 return Builder.CreateBitCast(Src, DstTy, "conv"); in EmitScalarConversion()
832 llvm::Type *ResTy = DstTy; in EmitScalarConversion()
838 EmitFloatConversionCheck(OrigSrc, OrigSrcType, Src, SrcType, DstType, DstTy, in EmitScalarConversion()
851 return Builder.CreateFPTrunc(Src, DstTy); in EmitScalarConversion()
853 DstTy = CGF.FloatTy; in EmitScalarConversion()
861 if (isa<llvm::IntegerType>(DstTy)) in EmitScalarConversion()
862 Res = Builder.CreateIntCast(Src, DstTy, InputSigned, "conv"); in EmitScalarConversion()
864 Res = Builder.CreateSIToFP(Src, DstTy, "conv"); in EmitScalarConversion()
866 Res = Builder.CreateUIToFP(Src, DstTy, "conv"); in EmitScalarConversion()
867 } else if (isa<llvm::IntegerType>(DstTy)) { in EmitScalarConversion()
870 Res = Builder.CreateFPToSI(Src, DstTy, "conv"); in EmitScalarConversion()
872 Res = Builder.CreateFPToUI(Src, DstTy, "conv"); in EmitScalarConversion()
874 assert(SrcTy->isFloatingPointTy() && DstTy->isFloatingPointTy() && in EmitScalarConversion()
876 if (DstTy->getTypeID() < SrcTy->getTypeID()) in EmitScalarConversion()
877 Res = Builder.CreateFPTrunc(Src, DstTy, "conv"); in EmitScalarConversion()
879 Res = Builder.CreateFPExt(Src, DstTy, "conv"); in EmitScalarConversion()
882 if (DstTy != ResTy) { in EmitScalarConversion()
899 CodeGenFunction::ComplexPairTy Src, QualType SrcTy, QualType DstTy, in EmitComplexToScalarConversion() argument
905 if (DstTy->isBooleanType()) { in EmitComplexToScalarConversion()
907 Src.first = EmitScalarConversion(Src.first, SrcTy, DstTy, Loc); in EmitComplexToScalarConversion()
908 Src.second = EmitScalarConversion(Src.second, SrcTy, DstTy, Loc); in EmitComplexToScalarConversion()
916 return EmitScalarConversion(Src.first, SrcTy, DstTy, Loc); in EmitComplexToScalarConversion()
1056 llvm::Type *DstTy = ConvertType(DstType); in VisitConvertVectorExpr() local
1059 if (SrcTy == DstTy) in VisitConvertVectorExpr()
1067 assert(DstTy->isVectorTy() && in VisitConvertVectorExpr()
1071 *DstEltTy = DstTy->getVectorElementType(); in VisitConvertVectorExpr()
1091 Res = Builder.CreateIntCast(Src, DstTy, InputSigned, "conv"); in VisitConvertVectorExpr()
1093 Res = Builder.CreateSIToFP(Src, DstTy, "conv"); in VisitConvertVectorExpr()
1095 Res = Builder.CreateUIToFP(Src, DstTy, "conv"); in VisitConvertVectorExpr()
1099 Res = Builder.CreateFPToSI(Src, DstTy, "conv"); in VisitConvertVectorExpr()
1101 Res = Builder.CreateFPToUI(Src, DstTy, "conv"); in VisitConvertVectorExpr()
1106 Res = Builder.CreateFPTrunc(Src, DstTy, "conv"); in VisitConvertVectorExpr()
1108 Res = Builder.CreateFPExt(Src, DstTy, "conv"); in VisitConvertVectorExpr()
1379 llvm::Type *DstTy = ConvertType(DestTy); in VisitCastExpr() local
1380 if (SrcTy->isPtrOrPtrVectorTy() && DstTy->isPtrOrPtrVectorTy() && in VisitCastExpr()
1381 SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace()) { in VisitCastExpr()
1394 return Builder.CreateBitCast(Src, DstTy); in VisitCastExpr()
1529 llvm::Type *DstTy = ConvertType(DestTy); in VisitCastExpr() local
1532 unsigned NumElements = DstTy->getVectorNumElements(); in VisitCastExpr()
3401 llvm::Type *DstTy = ConvertType(E->getType()); in VisitAsTypeExpr() local
3406 unsigned NumElementsDst = isa<llvm::VectorType>(DstTy) ? in VisitAsTypeExpr()
3407 cast<llvm::VectorType>(DstTy)->getNumElements() : 0; in VisitAsTypeExpr()
3413 Src = Builder.CreateBitCast(Src, DstTy); in VisitAsTypeExpr()
3422 auto Vec4Ty = llvm::VectorType::get(DstTy->getVectorElementType(), 4); in VisitAsTypeExpr()
3429 return Builder.CreateBitCast(Src, DstTy, "astype"); in VisitAsTypeExpr()
3453 QualType DstTy, in EmitScalarConversion() argument
3455 assert(hasScalarEvaluationKind(SrcTy) && hasScalarEvaluationKind(DstTy) && in EmitScalarConversion()
3457 return ScalarExprEmitter(*this).EmitScalarConversion(Src, SrcTy, DstTy, Loc); in EmitScalarConversion()
3464 QualType DstTy, in EmitComplexToScalarConversion() argument
3466 assert(SrcTy->isAnyComplexType() && hasScalarEvaluationKind(DstTy) && in EmitComplexToScalarConversion()
3469 .EmitComplexToScalarConversion(Src, SrcTy, DstTy, Loc); in EmitComplexToScalarConversion()