[flang-commits] [flang] [flang] Implement non-standard RTC intrinsic (PR #182560)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Fri Feb 20 11:56:16 PST 2026


================
@@ -7762,6 +7763,14 @@ IntrinsicLibrary::genSecond(std::optional<mlir::Type> resultType,
   return {};
 }
 
+// RTC
+mlir::Value IntrinsicLibrary::genRtc(mlir::Type resultType,
+                                     llvm::ArrayRef<mlir::Value> args) {
+  assert(args.empty());
+  mlir::Value time = fir::runtime::genTime(builder, loc);
----------------
eugeneepshteyn wrote:

I think `fir::runtime::genCpuTime()` will return the value of the best possible precision.

https://github.com/llvm/llvm-project/pull/182560


More information about the flang-commits mailing list