================ @@ -2521,6 +2521,32 @@ def ComplexImagOp : CIR_Op<"complex.imag", [Pure]> { let hasFolder = 1; } +//===----------------------------------------------------------------------===// +// ComplexAddOp +//===----------------------------------------------------------------------===// + +def ComplexAddOp : CIR_Op<"complex.add", [Pure, SameOperandsAndResultType]> { + let summary = "Complex addition"; + let description = [{ + The `cir.complex.add` operation takes two complex numbers and returns + their sum. + + Example: + + ```mlir + %2 = cir.complex.add %0, %1 -> !cir.complex<!cir.float> ---------------- xlauko wrote:
We had discussion about return type assembly format this monday. And I would like to unify return types to represented as `-> return_type`. Though maybe in case the type applies to entire operation, like in this case, `:` form is better and can be nice distinguisher? https://github.com/llvm/llvm-project/pull/147578 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits