[Mlir-commits] [mlir] [mlir][tensor] move tensor.insert constant folding out of canonicalization (PR #142671)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 5 07:23:17 PDT 2025


================
@@ -176,6 +176,9 @@ void populateFoldConstantExtractSlicePatterns(
           return false;
         });
 
+/// Patterns to fold inserts into a constant into a new constant.
+void populateFoldInsertAfterConstant(RewritePatternSet &patterns);
----------------
asraa wrote:

I think it feels different than that - since it creates new constants. If it's not OK to expose one-off patterns in upstream MLIR, I'll put this in our own repo. Updating this PR to remove the pattern entirely.

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


More information about the Mlir-commits mailing list