@@ -491,6 +491,18 @@ class CIRSinOpLowering : public mlir::OpConversionPattern<cir::SinOp> {
491
491
}
492
492
};
493
493
494
+ class CIRASinOpLowering : public mlir ::OpConversionPattern<cir::ASinOp> {
495
+ public:
496
+ using mlir::OpConversionPattern<cir::ASinOp>::OpConversionPattern;
497
+
498
+ mlir::LogicalResult
499
+ matchAndRewrite (cir::ASinOp op, OpAdaptor adaptor,
500
+ mlir::ConversionPatternRewriter &rewriter) const override {
501
+ rewriter.replaceOpWithNewOp <mlir::math::AsinOp>(op, adaptor.getSrc ());
502
+ return mlir::LogicalResult::success ();
503
+ }
504
+ };
505
+
494
506
template <typename CIROp, typename MLIROp>
495
507
class CIRCountZerosBitOpLowering : public mlir ::OpConversionPattern<CIROp> {
496
508
public:
@@ -1395,8 +1407,8 @@ void populateCIRToMLIRConversionPatterns(mlir::RewritePatternSet &patterns,
1395
1407
CIRBitClzOpLowering, CIRBitCtzOpLowering, CIRBitPopcountOpLowering,
1396
1408
CIRBitClrsbOpLowering, CIRBitFfsOpLowering, CIRBitParityOpLowering,
1397
1409
CIRIfOpLowering, CIRVectorCreateLowering, CIRVectorInsertLowering,
1398
- CIRVectorExtractLowering, CIRVectorCmpOpLowering, CIRACosOpLowering>(
1399
- converter, patterns.getContext ());
1410
+ CIRVectorExtractLowering, CIRVectorCmpOpLowering, CIRACosOpLowering,
1411
+ CIRASinOpLowering>( converter, patterns.getContext ());
1400
1412
}
1401
1413
1402
1414
static mlir::TypeConverter prepareTypeConverter () {
0 commit comments