[Mlir-commits] [mlir] [mlir][vector] Teach `TransferOptimization` to forward masked stores (PR #87794)

Benjamin Maxwell llvmlistbot at llvm.org
Wed May 15 07:12:35 PDT 2024


================
@@ -170,12 +170,43 @@ AffineMap mlir::vector::getTransferMinorIdentityMap(ShapedType shapedType,
       shapedType.getContext());
 }
 
+/// Returns true if the value written by `defWrite` could be the same as the
+/// value read by `read`. Note: True is 'could be' not 'definitely' (as this
+/// simply looks at the masks and the value written). For a definite answer use
+/// `checkSameValueRAW()` -- which calls this function.
+static bool couldBeSameValueWithMasking(vector::TransferWriteOp defWrite,
----------------
MacDue wrote:

It comes from `checkSameValueRAW()` it's the write that defines the (value of) the read.

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


More information about the Mlir-commits mailing list