[PATCH] D120403: [WIP][Flang] Lower Fortran intrinsic to a runtime call/llvm intr

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 15:47:34 PST 2022


kiranchandramohan added inline comments.


================
Comment at: flang/lib/Lower/IntrinsicCall.cpp:153-167
+enum MathRuntimeVersion {
+  fastVersion,
+  relaxedVersion,
+  preciseVersion,
+  llvmOnly
+};
+llvm::cl::opt<MathRuntimeVersion> mathRuntimeVersion(
----------------
Note: These flags are not tested in this patch since the `abs` intrinsic does not have fast/relaxed/precise versions for float, it only has an llvm or math runtime lowering for float. Can remove if necessary.


================
Comment at: flang/lib/Lower/IntrinsicCall.cpp:211
+static constexpr RuntimeFunction llvmIntrinsics[] = {
+    {"abs", "llvm.fabs.f32", genF32F32FuncType},
+    {"abs", "llvm.fabs.f64", genF64F64FuncType},
----------------
Have raised https://github.com/flang-compiler/f18-llvm-project/issues/1497 to discuss the half, bfloat, 80bit, 128bit precision types.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120403/new/

https://reviews.llvm.org/D120403



More information about the llvm-commits mailing list