[Mlir-commits] [mlir] [mlir] Canonicalize tensor.extract_slice (linalg.fill) (PR #112619)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Oct 17 01:30:10 PDT 2024
================
@@ -806,6 +806,36 @@ struct FoldFillWithTensorExtract : public OpRewritePattern<tensor::ExtractOp> {
}
};
+/// Fold tensor.extract_slice(linalg.fill(<input>)) into <input>
----------------
banach-space wrote:
Hm, this comment is not quite correct, is it? You are replacing `tensor.extract_slice` with `linalg.fill`, right?
What if there are multiple uses of the original `linalg.fill`? Then this is adding another `linalg.fill` (and `tensor.empty`) rather than updating the original `linalg.fill`? Is that still more canonical?
https://github.com/llvm/llvm-project/pull/112619
More information about the Mlir-commits
mailing list