[Mlir-commits] [mlir] 3eb121c - [mlir][complex] Make AddOp commutative (#212199)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Aug 9 23:18:39 PDT 2026
Author: Bryth
Date: 2026-08-10T08:18:34+02:00
New Revision: 3eb121cd9f7d2069493b19f83434570caad11e70
URL: https://github.com/llvm/llvm-project/commit/3eb121cd9f7d2069493b19f83434570caad11e70
DIFF: https://github.com/llvm/llvm-project/commit/3eb121cd9f7d2069493b19f83434570caad11e70.diff
LOG: [mlir][complex] Make AddOp commutative (#212199)
Complex AddOp should have the `Commutative` trait to follow Arith's
AddOp semantics.
Added:
Modified:
mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td b/mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
index 828379ded14b3..c6a0b8e9dfeea 100644
--- a/mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
+++ b/mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
@@ -66,7 +66,7 @@ def AbsOp : ComplexUnaryOp<"abs",
// AddOp
//===----------------------------------------------------------------------===//
-def AddOp : ComplexArithmeticOp<"add"> {
+def AddOp : ComplexArithmeticOp<"add", [Commutative]> {
let summary = "complex addition";
let description = [{
The `add` operation takes two complex numbers and returns their sum.
More information about the Mlir-commits
mailing list