@@ -495,6 +495,18 @@ class CIRSinOpLowering : public mlir::OpConversionPattern<cir::SinOp> {
495495 }
496496};
497497
498+ class CIRASinOpLowering : public mlir ::OpConversionPattern<cir::ASinOp> {
499+ public:
500+ using mlir::OpConversionPattern<cir::ASinOp>::OpConversionPattern;
501+
502+ mlir::LogicalResult
503+ matchAndRewrite (cir::ASinOp op, OpAdaptor adaptor,
504+ mlir::ConversionPatternRewriter &rewriter) const override {
505+ rewriter.replaceOpWithNewOp <mlir::math::AsinOp>(op, adaptor.getSrc ());
506+ return mlir::LogicalResult::success ();
507+ }
508+ };
509+
498510template <typename CIROp, typename MLIROp>
499511class CIRCountZerosBitOpLowering : public mlir ::OpConversionPattern<CIROp> {
500512public:
@@ -1422,8 +1434,8 @@ void populateCIRToMLIRConversionPatterns(mlir::RewritePatternSet &patterns,
14221434 CIRBitClzOpLowering, CIRBitCtzOpLowering, CIRBitPopcountOpLowering,
14231435 CIRBitClrsbOpLowering, CIRBitFfsOpLowering, CIRBitParityOpLowering,
14241436 CIRIfOpLowering, CIRVectorCreateLowering, CIRVectorInsertLowering,
1425- CIRVectorExtractLowering, CIRVectorCmpOpLowering, CIRACosOpLowering>(
1426- converter, patterns.getContext ());
1437+ CIRVectorExtractLowering, CIRVectorCmpOpLowering, CIRACosOpLowering,
1438+ CIRASinOpLowering>( converter, patterns.getContext ());
14271439}
14281440
14291441static mlir::TypeConverter prepareTypeConverter () {
0 commit comments