[llvm-branch-commits] [mlir] [MLIR][Linalg] Remove binary named ops (PR #220912)

Renato Golin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 4 09:05:13 PDT 2026


================
@@ -135,14 +135,14 @@ func.func @expect_no_fold_of_add_as_operands_do_not_dominate_each_other(%arg0: !
   %1 = tensor.empty() : !type
   %2 = linalg.fill ins(%cst : f32) outs(%1 : !type) -> !type
   %3 = linalg.matmul ins(%arg0, %0 : !type, !type) outs(%2 : !type) -> !type
-  %4 = linalg.add ins(%3, %3 : !type, !type) outs(%1 : !type) -> !type
+  %4 = linalg.elementwise kind=#linalg.elementwise_kind<add> ins(%3, %3 : !type, !type) outs(%1 : !type) -> !type
   return %4 : !type
 }
 
 // CHECK-LABEL: func.func @expect_no_fold_of_add_as_operands_do_not_dominate_each_other
 // CHECK: linalg.fill
 // CHECK-NEXT: linalg.matmul
-// CHECK-NEXT: linalg.add
+// CHECK-NEXT: linalg.elementwise
----------------
rengolin wrote:

The examples that have more than one elementwise do check which (see below)

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


More information about the llvm-branch-commits mailing list