[Mlir-commits] [mlir] [mlir][tensor] Forward concat insert_slice destination into DPS provider (PR #183490)

Dhruv Chauhan llvmlistbot at llvm.org
Wed Apr 1 02:15:51 PDT 2026


================
@@ -246,6 +246,7 @@ struct InsertSliceOfInsertSliceFolder : public OpRewritePattern<OpTy> {
 
 void tensor::populateFoldTensorSubsetOpPatterns(RewritePatternSet &patterns) {
   populateFoldTensorSubsetIntoVectorTransferPatterns(patterns);
+  populateForwardConcatInsertSliceDestPatterns(patterns);
----------------
dchauhan-arm wrote:

Thanks for catching this. Rather than a revert + reland, let me submit a follow up that removes the line from `populateFoldTensorSubsetOpPatterns` which should remove the infinite loop, and moves forwarding logic inline to `ConcatConverter::matchAndRewrite` so it runs at `insert_slice` creation time during the actual `tosa.concat` lowering. The separate pattern was also ineffective inside `applyPartialConversion` since `InsertSliceOp` is already legal and never visited. It would be self contained. Would that work, or would you prefer a clean revert first? 

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


More information about the Mlir-commits mailing list