diff options
Diffstat (limited to 'flang/include/flang/Optimizer/HLFIR/HLFIROps.td')
-rw-r--r-- | flang/include/flang/Optimizer/HLFIR/HLFIROps.td | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/flang/include/flang/Optimizer/HLFIR/HLFIROps.td b/flang/include/flang/Optimizer/HLFIR/HLFIROps.td index 87136197851a..924e868d32af 100644 --- a/flang/include/flang/Optimizer/HLFIR/HLFIROps.td +++ b/flang/include/flang/Optimizer/HLFIR/HLFIROps.td @@ -317,6 +317,28 @@ def hlfir_ConcatOp : hlfir_Op<"concat", []> { let hasVerifier = 1; } +def hlfir_AnyOp : hlfir_Op<"any", []> { + let summary = "ANY transformational intrinsic"; + let description = [{ + Takes a logical array MASK as argument, optionally along a particular dimension, + and returns true if any element of MASK is true. + }]; + + let arguments = (ins + AnyFortranLogicalArrayObject:$mask, + Optional<AnyIntegerType>:$dim + ); + + let results = (outs hlfir_ExprType); + + let assemblyFormat = [{ + $mask (`dim` $dim^)? attr-dict `:` functional-type(operands, results) + }]; + + let hasVerifier = 1; +} + + def hlfir_ProductOp : hlfir_Op<"product", [AttrSizedOperandSegments, DeclareOpInterfaceMethods<ArithFastMathInterface>]> { let summary = "PRODUCT transformational intrinsic"; |