diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td --- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td +++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td @@ -525,6 +525,39 @@ }]; } +//===----------------------------------------------------------------------===// +// Atan2Op +//===----------------------------------------------------------------------===// + +def Atan2Op : FloatArithmeticOp<"atan2">{ + let summary = "2-argument arcus tangent of the given values"; + let description = [{ + Syntax: + + ``` + operation ::= ssa-id `=` `std.atan2` ssa-use `,` ssa-use `:` type + ``` + + The `atan2` operation takes two operands and returns one result, all of + which must be of the same type. This type may be a floating point scalar + type, a vector whose element type is a floating point type, or a floating + point tensor. + + Example: + + ```mlir + // Scalar variant. + %a = atan2 %b, %c : f32 + + // SIMD vector variant. + %f = atan2 %g, %h : vector<4xf32> + + // Tensor variant. + %x = atan2 %y, %z : tensor<4x?xf32> + ``` + }]; +} + //===----------------------------------------------------------------------===// // AtomicRMWOp //===----------------------------------------------------------------------===//