[Mlir-commits] [mlir] [MLIR][Vector] Implement XferOp To {Load|Store}Lowering as MaskableOpRewritePattern (PR #92892)

Andrzej Warzyński llvmlistbot at llvm.org
Wed Jun 12 12:56:26 PDT 2024


================
@@ -639,14 +643,15 @@ struct TransferWriteToVectorStoreLowering
                    << write;
             });
 
-      rewriter.replaceOpWithNewOp<vector::MaskedStoreOp>(
-          write, write.getSource(), write.getIndices(), write.getMask(),
-          write.getVector());
+      rewriter.create<vector::MaskedStoreOp>(
+          write.getLoc(), write.getSource(), write.getIndices(),
+          write.getMask(), write.getVector());
+      return Value();
----------------
banach-space wrote:

+1 to your comment @hanhanW , but this is a bit more nuanced 😅 

I implemented it this because there's quite a few places that simply return `Value`, e.g.:
https://github.com/llvm/llvm-project/blob/77db8b08c8b186c2625f8dfb26bb976561b43c4c/mlir/lib/Dialect/Vector/Transforms/LowerVectorContract.cpp#L432-L455

Lambdas like that get used a lot :) I recall trying to update that and other similar examples, but never got round to it. Sounds like a worthwhile TODO!

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


More information about the Mlir-commits mailing list