[flang-commits] [flang] [Flang] Add a HLFIR Minloc intrinsic (PR #74436)
David Green via flang-commits
flang-commits at lists.llvm.org
Fri Dec 8 02:49:33 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,
----------------
davemgreen wrote:
I had considered that, but only went the other way as I noticed CountOp had a kind parameter already. I've had a go at changing it over to just use the return type.
https://github.com/llvm/llvm-project/pull/74436
More information about the flang-commits
mailing list