[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
Mon Sep 30 15:08:26 PDT 2024
================
@@ -154,6 +163,17 @@ LogicalResult InsertSliceOfTransferWriteOpFolder::matchAndRewrite(
return success();
}
+bool InsertSliceOfTransferWriteOpFolder::doesTransferWriteCoverInsertSlice(
+ vector::TransferWriteOp writeOp) {
+ if (writeOp.getShapedType().hasStaticShape())
+ return llvm::equal(writeOp.getVectorType().getShape(),
+ writeOp.getShapedType().getShape());
----------------
hanhanW wrote:
I see. Yeah, makes sense. I did not think it carefully. I was also confused that why my comment was resolved but there are no related tests. Sorry for the bad suggestion. Can you revert it to what it was?
https://github.com/llvm/llvm-project/pull/108803
More information about the Mlir-commits
mailing list