@@ -1263,7 +1263,8 @@ class CIRCastOpLowering : public mlir::OpConversionPattern<cir::CastOp> {
12631263 case CIR::array_to_ptrdecay: {
12641264 auto newDstType = llvm::cast<mlir::MemRefType>(convertTy (dstType));
12651265 rewriter.replaceOpWithNewOp <mlir::memref::ReinterpretCastOp>(
1266- op, newDstType, src, 0 , std::nullopt , std::nullopt );
1266+ op, newDstType, src, 0 , ArrayRef<int64_t >{}, ArrayRef<int64_t >{},
1267+ ArrayRef<mlir::NamedAttribute>{});
12671268 return mlir::success ();
12681269 }
12691270 case CIR::int_to_bool: {
@@ -1397,8 +1398,9 @@ class CIRGetElementOpLowering
13971398 rewriter.replaceOpWithNewOp <mlir::memref::ReinterpretCastOp>(
13981399 op, dstType, adaptor.getBase (),
13991400 /* offset */ index,
1400- /* sizes */ std::nullopt ,
1401- /* strides */ std::nullopt );
1401+ /* sizes */ ArrayRef<mlir::OpFoldResult>{},
1402+ /* strides */ ArrayRef<mlir::OpFoldResult>{},
1403+ /* attr */ ArrayRef<mlir::NamedAttribute>{});
14021404
14031405 return mlir::success ();
14041406 }
@@ -1476,7 +1478,8 @@ class CIRPtrStrideOpLowering
14761478 stride = rewriter.create <mlir::arith::IndexCastOp>(op.getLoc (), indexType,
14771479 stride);
14781480 rewriter.replaceOpWithNewOp <mlir::memref::ReinterpretCastOp>(
1479- op, newDstType, base, stride, std::nullopt , std::nullopt );
1481+ op, newDstType, base, stride, mlir::ValueRange{}, mlir::ValueRange{},
1482+ llvm::ArrayRef<mlir::NamedAttribute>{});
14801483 rewriter.eraseOp (baseOp);
14811484 return mlir::success ();
14821485 }
0 commit comments