[Mlir-commits] [mlir] Fold `linalg.fill` -> `linalg.copy` (PR #72920)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 21 06:20:24 PST 2023
================
@@ -972,3 +972,29 @@ func.func @canonicalize_dim_of_dest_style_op(%arg0 : tensor<?x?xf32>) -> tensor<
%3 = linalg.copy ins(%1 : tensor<?x?xf32>) outs(%2 : tensor<?x?xf32>) -> tensor<?x?xf32>
return %3: tensor<?x?xf32>
}
+// -----
+
+// CHECK-LABEL: func @canonicalize_fill_to_copy_input(
+// CHECK-SAME: %[[ARG0:[a-zA-Z0-9]+]]: tensor<?x?xf32>
+// CHECK-SAME: %[[ARG1:[a-zA-Z0-9]+]]: tensor<?x?xf32>)
+// CHECK: %[[ZERO:.+]] = arith.constant 0.0
----------------
MaheshRavishankar wrote:
DCE does remove it. It isn't removed by the pattern though explicitly. So I'd rather not test for that here.
https://github.com/llvm/llvm-project/pull/72920
More information about the Mlir-commits
mailing list