Home
last modified time | relevance | path

Searched refs:dstTy (Results 1 – 3 of 3) sorted by relevance

/freebsd/contrib/llvm-project/clang/lib/CIR/CodeGen/
H A DCIRGenExprScalar.cpp102 mlir::Type dstTy) const { in maybePromoteBoolResult()
103 if (mlir::isa<cir::IntType>(dstTy)) in maybePromoteBoolResult()
104 return builder.createBoolToInt(value, dstTy); in maybePromoteBoolResult()
105 if (mlir::isa<cir::BoolType>(dstTy)) in maybePromoteBoolResult()
318 mlir::Type dstTy, ScalarConversionOpts opts) { in emitScalarCast() argument
322 mlir::isa<mlir::IntegerType>(dstTy)) && in emitScalarCast()
325 mlir::Type fullDstTy = dstTy; in emitScalarCast()
327 mlir::isa<cir::VectorType>(dstTy)) { in emitScalarCast()
330 dstTy = mlir::dyn_cast<cir::VectorType>(dstTy).getElementType(); in emitScalarCast()
338 if (cgf.getBuilder().isInt(dstTy)) in emitScalarCast()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/
H A DLowerToLLVM.cpp82 mlir::IntegerType dstTy, in createIntCast() argument
88 unsigned dstWidth = mlir::cast<mlir::IntegerType>(dstTy).getWidth(); in createIntCast()
92 return bld.create<mlir::LLVM::SExtOp>(loc, dstTy, src); in createIntCast()
94 return bld.create<mlir::LLVM::ZExtOp>(loc, dstTy, src); in createIntCast()
96 return bld.create<mlir::LLVM::TruncOp>(loc, dstTy, src); in createIntCast()
97 return bld.create<mlir::LLVM::BitcastOp>(loc, dstTy, src); in createIntCast()
619 mlir::Type dstTy = elementTypeIfVector(castOp.getType()); in matchAndRewrite() local
621 if (!mlir::isa<cir::FPTypeInterface>(dstTy) || in matchAndRewrite()
623 return castOp.emitError() << "NYI cast from " << srcTy << " to " << dstTy; in matchAndRewrite()
629 if (getFloatWidth(srcTy) > getFloatWidth(dstTy)) in matchAndRewrite()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DMemorySanitizer.cpp2650 Value *CreateShadowCast(IRBuilder<> &IRB, Value *V, Type *dstTy, in CreateShadowCast()
2653 if (srcTy == dstTy) in CreateShadowCast()
2656 size_t dstSizeInBits = VectorOrPrimitiveTypeSizeInBits(dstTy); in CreateShadowCast()
2660 if (dstTy->isIntegerTy() && srcTy->isIntegerTy()) in CreateShadowCast()
2661 return IRB.CreateIntCast(V, dstTy, Signed); in CreateShadowCast()
2662 if (dstTy->isVectorTy() && srcTy->isVectorTy() && in CreateShadowCast()
2663 cast<VectorType>(dstTy)->getElementCount() == in CreateShadowCast()
2665 return IRB.CreateIntCast(V, dstTy, Signed); in CreateShadowCast()
2669 return IRB.CreateBitCast(V2, dstTy); in CreateShadowCast()