@@ -386,7 +386,10 @@ static constexpr IntrinsicHandler handlers[]{
386386 {{{" name" , asAddr}, {" status" , asAddr, handleDynamicOptional}}},
387387 /* isElemental=*/ false },
388388 {" clock" , &I::genNVVMTime<mlir::NVVM::ClockOp>, {}, /* isElemental=*/ false },
389- {" clock64" , &I::genClock64, {}, /* isElemental=*/ false },
389+ {" clock64" ,
390+ &I::genNVVMTime<mlir::NVVM::Clock64Op>,
391+ {},
392+ /* isElemental=*/ false },
390393 {" cmplx" ,
391394 &I::genCmplx,
392395 {{{" x" , asValue}, {" y" , asValue, handleDynamicOptional}}}},
@@ -3565,16 +3568,6 @@ IntrinsicLibrary::genChdir(std::optional<mlir::Type> resultType,
35653568 return {};
35663569}
35673570
3568- // CLOCK64
3569- mlir::Value IntrinsicLibrary::genClock64 (mlir::Type resultType,
3570- llvm::ArrayRef<mlir::Value> args) {
3571- constexpr llvm::StringLiteral funcName = " llvm.nvvm.read.ptx.sreg.clock64" ;
3572- mlir::MLIRContext *context = builder.getContext ();
3573- mlir::FunctionType ftype = mlir::FunctionType::get (context, {}, {resultType});
3574- auto funcOp = builder.createFunction (loc, funcName, ftype);
3575- return builder.create <fir::CallOp>(loc, funcOp, args).getResult (0 );
3576- }
3577-
35783571// CMPLX
35793572mlir::Value IntrinsicLibrary::genCmplx (mlir::Type resultType,
35803573 llvm::ArrayRef<mlir::Value> args) {
@@ -7204,7 +7197,7 @@ IntrinsicLibrary::genNull(mlir::Type, llvm::ArrayRef<fir::ExtendedValue> args) {
72047197 return fir::MutableBoxValue (boxStorage, mold->nonDeferredLenParams (), {});
72057198}
72067199
7207- // CLOCK, GLOBALTIMER
7200+ // CLOCK, CLOCK64, GLOBALTIMER
72087201template <typename OpTy>
72097202mlir::Value IntrinsicLibrary::genNVVMTime (mlir::Type resultType,
72107203 llvm::ArrayRef<mlir::Value> args) {
0 commit comments