[flang-commits] [flang] [flang][runtime] Support NORM2 for REAL(16) with FortranFloat128Math lib. (PR #83219)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Wed Feb 28 08:53:14 PST 2024


================
@@ -149,6 +149,22 @@ struct ForcedNorm2Real16 {
   }
 };
 
+/// Placeholder for real*16 version of Norm2Dim Intrinsic
+struct ForcedNorm2DimReal16 {
+  static constexpr const char *name = ExpandAndQuoteKey(RTNAME(Norm2DimReal16));
+  static constexpr fir::runtime::FuncTypeBuilderFunc getTypeModel() {
+    return [](mlir::MLIRContext *ctx) {
+      auto boxTy =
+          fir::runtime::getModel<const Fortran::runtime::Descriptor &>()(ctx);
+      auto strTy = fir::ReferenceType::get(mlir::IntegerType::get(ctx, 8));
+      auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int));
----------------
vzakhari wrote:

Good idea! I created enhancement request https://github.com/llvm/llvm-project/issues/83290 for this.  We use direct types creation all over the place.

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


More information about the flang-commits mailing list