[flang-commits] [flang] [Flang] Add a HLFIR Minloc intrinsic (PR #74436)
via flang-commits
flang-commits at lists.llvm.org
Tue Dec 5 02:04: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,
----------------
jeanPerier wrote:
KIND is not needed at the for HLFIR: if present, it is a constant expression that should be reflected in the integer result type (already "applied" by semantics).
https://github.com/llvm/llvm-project/pull/74436
More information about the flang-commits
mailing list