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

Benjamin Maxwell llvmlistbot at llvm.org
Mon Sep 30 02:02:03 PDT 2024


================
@@ -154,6 +167,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());
+
+  // TODO: ValueBoundsConstraintSet for dynamic shapes.
----------------
MacDue wrote:

Can you make the TODO a complete sentence. E.g. `// TODO: Use ValueBoundsConstraintSet ...`

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


More information about the Mlir-commits mailing list