[Mlir-commits] [mlir] [mlir][tensor] Apply `InsertSliceOfTransferWriteOpFolder` only when `transfer_write` overwrites all elements of `insert_slice` (PR #108803)

Han-Chung Wang llvmlistbot at llvm.org
Wed Sep 25 10:23:30 PDT 2024


================
@@ -154,6 +163,18 @@ LogicalResult InsertSliceOfTransferWriteOpFolder::matchAndRewrite(
   return success();
 }
 
+bool InsertSliceOfTransferWriteOpFolder::doesTransferWriteCoverInsertSlice(
+    vector::TransferWriteOp writeOp) {
+  if (writeOp.getVectorType().hasStaticShape() &&
----------------
hanhanW wrote:

I think the vector type can only have static shapes, so we don't need this check?

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


More information about the Mlir-commits mailing list