[flang-commits] [flang] [flang] Fix for atand(Y, X), and implment atan2d(Y, X) (PR #79002)

via flang-commits flang-commits at lists.llvm.org
Fri Jan 26 00:19:45 PST 2024


================
@@ -333,11 +333,15 @@ static const IntrinsicInterface genericIntrinsicFunction[]{
                 common::Intent::In, {ArgFlag::canBeNull}}},
         DefaultLogical, Rank::elemental, IntrinsicClass::inquiryFunction},
     {"atan", {{"x", SameFloating}}, SameFloating},
-    {"atand", {{"x", SameFloating}}, SameFloating},
     {"atan", {{"y", OperandReal}, {"x", OperandReal}}, OperandReal},
-    {"atand", {{"y", OperandReal}, {"x", OperandReal}}, OperandReal},
+    {"atand",
+        {{"y", SameReal, Rank::scalar, Optionality::required,
+             common::Intent::In},
+            {"x", SameReal, Rank::scalar, Optionality::optional,
+                common::Intent::In}},
+        SameReal, Rank::scalar, IntrinsicClass::inquiryFunction},
----------------
jeanPerier wrote:

Using args.size() to distinguish here is fine and done in other cases like bessel_jn here https://github.com/llvm/llvm-project/blob/0f4e9e718b4e79d3f760fd7ea399c23fc97a7716/flang/lib/Optimizer/Builder/IntrinsicCall.cpp#L2200.

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


More information about the flang-commits mailing list