[Mlir-commits] [mlir] 6c8a605 - [mlir][complex] Make complex MulOp commutative (#215257)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 12 00:57:07 PDT 2026
Author: Bryth
Date: 2026-08-12T09:57:02+02:00
New Revision: 6c8a605e097863e8410bb81c434702f2ce13902a
URL: https://github.com/llvm/llvm-project/commit/6c8a605e097863e8410bb81c434702f2ce13902a
DIFF: https://github.com/llvm/llvm-project/commit/6c8a605e097863e8410bb81c434702f2ce13902a.diff
LOG: [mlir][complex] Make complex MulOp commutative (#215257)
This PR makes complex multiplication commutative. This is consistent
with Arith's MulFOp, and Complex addition also being commutative.
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 06ab64f4dd132..71fa9ea9c3153 100644
--- a/mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
+++ b/mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
@@ -365,7 +365,7 @@ def Log1pOp : ComplexUnaryOp<"log1p", [SameOperandsAndResultType]> {
// MulOp
//===----------------------------------------------------------------------===//
-def MulOp : ComplexArithmeticOp<"mul"> {
+def MulOp : ComplexArithmeticOp<"mul", [Commutative]> {
let summary = "complex multiplication";
let description = [{
The `mul` operation takes two complex numbers and returns their product:
More information about the Mlir-commits
mailing list