[llvm-branch-commits] [flang] [mlir] [MLIR] Add new complex.powi op (PR #158722)

Mehdi Amini via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Sep 15 14:10:53 PDT 2025


================
@@ -443,6 +443,32 @@ def PowOp : ComplexArithmeticOp<"pow"> {
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// PowiOp
+//===----------------------------------------------------------------------===//
+
+def PowiOp : Complex_Op<"powi",
+    [Pure, Elementwise, SameOperandsAndResultShape,
+     AllTypesMatch<["lhs", "result"]>]> {
+  let summary = "complex number raised to integer power";
+  let description = [{
+    The `powi` operation takes a complex number and an integer exponent.
----------------
joker-eph wrote:

The signed aspects of the operands, as well at the overflow behaviors should be specified here.
This may need an overflow flag by the way.

https://github.com/llvm/llvm-project/pull/158722


More information about the llvm-branch-commits mailing list