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

Matthias Springer llvmlistbot at llvm.org
Wed Jun 4 16:59:04 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);
----------------
matthias-springer wrote:

Maybe `MergeConsecutiveInsertExtractSlicePatterns.cpp` could be generalized to include this pattern.

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


More information about the Mlir-commits mailing list