@@ -279,6 +279,18 @@ class CIRStoreOpLowering : public mlir::OpConversionPattern<cir::StoreOp> {
279
279
}
280
280
};
281
281
282
+ class CIRACosOpLowering : public mlir ::OpConversionPattern<cir::ACosOp> {
283
+ public:
284
+ using OpConversionPattern<cir::ACosOp>::OpConversionPattern;
285
+
286
+ mlir::LogicalResult
287
+ matchAndRewrite (cir::ACosOp op, OpAdaptor adaptor,
288
+ mlir::ConversionPatternRewriter &rewriter) const override {
289
+ rewriter.replaceOpWithNewOp <mlir::math::AcosOp>(op, adaptor.getSrc ());
290
+ return mlir::LogicalResult::success ();
291
+ }
292
+ };
293
+
282
294
class CIRATanOpLowering : public mlir ::OpConversionPattern<cir::ATanOp> {
283
295
public:
284
296
using OpConversionPattern<cir::ATanOp>::OpConversionPattern;
@@ -1383,7 +1395,7 @@ void populateCIRToMLIRConversionPatterns(mlir::RewritePatternSet &patterns,
1383
1395
CIRBitClzOpLowering, CIRBitCtzOpLowering, CIRBitPopcountOpLowering,
1384
1396
CIRBitClrsbOpLowering, CIRBitFfsOpLowering, CIRBitParityOpLowering,
1385
1397
CIRIfOpLowering, CIRVectorCreateLowering, CIRVectorInsertLowering,
1386
- CIRVectorExtractLowering, CIRVectorCmpOpLowering>(
1398
+ CIRVectorExtractLowering, CIRVectorCmpOpLowering, CIRACosOpLowering >(
1387
1399
converter, patterns.getContext ());
1388
1400
}
1389
1401
0 commit comments