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 @@ -2405,6 +2405,71 @@ let hasFolder = 1; } +//===----------------------------------------------------------------------===// +// PowFOp +//===----------------------------------------------------------------------===// + +def PowFOp : FloatArithmeticOp<"powf"> { + let summary = "floating point raised to the power of operation"; + let description = [{ + Syntax: + + ``` + operation ::= ssa-id `=` `std.powf` ssa-use `,` ssa-use `:` type + ``` + + The `powf` operation takes two operands and returns one result, each of + these is required to be 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 exponentiation. + %a = powf %b, %c : f64 + + // SIMD pointwise vector exponentiation, e.g. for Intel SSE. + %f = powf %g, %h : vector<4xf32> + + // Tensor pointwise exponentiation. + %x = powf %y, %z : tensor<4x?xbf16> + ``` + }]; +} + +//===----------------------------------------------------------------------===// +// PowIOp +//===----------------------------------------------------------------------===// + +def PowIOp : IntArithmeticOp<"powi"> { + let summary = "integer raised to the power of operation"; + let description = [{ + Syntax: + + ``` + operation ::= ssa-id `=` `std.powi` ssa-use `,` ssa-use `:` type + ``` + + The `powi` operation takes two operands and returns one result, each of + these is required to be the same type. This type may be an integer scalar + type, a vector whose element type is an integer type, or an integral tensor. + + Example: + + ```mlir + // Scalar exponentiation. + %a = powi %b, %c : f64 + + // SIMD pointwise vector exponentiation, e.g. for Intel SSE. + %f = powi %g, %h : vector<4xf32> + + // Tensor pointwise exponentiation. + %x = powi %y, %z : tensor<4x?xbf16> + ``` + }]; +} + //===----------------------------------------------------------------------===// // PrefetchOp //===----------------------------------------------------------------------===//