[flang-commits] [flang] [Flang] Add a HLFIR Minloc intrinsic (PR #74436)

via flang-commits flang-commits at lists.llvm.org
Fri Dec 8 05:50:22 PST 2023


================
@@ -458,6 +458,33 @@ def hlfir_MinvalOp : hlfir_Op<"minval", [AttrSizedOperandSegments,
   let hasVerifier = 1;
 }
 
+def hlfir_MinlocOp : hlfir_Op<"minloc", [AttrSizedOperandSegments,
+    DeclareOpInterfaceMethods<ArithFastMathInterface>,
+    DeclareOpInterfaceMethods<MemoryEffectsOpInterface>]> {
+  let summary = "MINLOC transformational intrinsic";
+  let description = [{
+    Minlocs of an array.
+  }];
+
+  let arguments = (ins
+    AnyFortranArrayObject:$array,
+    Optional<AnyIntegerType>:$dim,
+    Optional<AnyFortranLogicalOrI1ArrayObject>:$mask,
+    Optional<AnyIntegerType>:$kind,
----------------
jeanPerier wrote:

Good point, I think we should remove it from CountOp afterwards then.

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


More information about the flang-commits mailing list