[llvm-branch-commits] [mlir] [MLIR][Linalg] Remove binary named ops (PR #220912)
Sayan Saha via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 4 08:11:21 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
----------------
sahas3 wrote:
I think it'll be good to capture the `kind` here to match with `add` and not `sub`
https://github.com/llvm/llvm-project/pull/220912
More information about the llvm-branch-commits
mailing list