[Mlir-commits] [mlir] [mlir] Canonicalize tensor.extract_slice (linalg.fill) (PR #112619)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Oct 29 06:21:21 PDT 2024


================
@@ -806,6 +806,36 @@ struct FoldFillWithTensorExtract : public OpRewritePattern<tensor::ExtractOp> {
   }
 };
 
+/// Fold tensor.extract_slice(linalg.fill(<input>)) into linalg.fill(<input>)
----------------
banach-space wrote:

[nit] Add a note that this triggers only when there's only one use "by design" (with one use this is obviously beneficial, with multiple uses it is not so clear)

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


More information about the Mlir-commits mailing list