[Mlir-commits] [mlir] [mlir][vector] Fix tensor transfer hoisting with mismatched masks or permutation maps (PR #234878)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Nov 2 01:50:11 PST 2026


================
@@ -124,6 +124,20 @@ def SubsetExtractionOpInterface
 
   let cppNamespace = "::mlir";
   let methods = [
+      InterfaceMethod<
----------------
Pecco-314 wrote:

Our check asks whether the inserted value can replace the next extraction’s result. `operatesOnDisjointSubset` asks whether two ops access non-overlapping tensor elements.

These are different properties. In both examples below, the read and write do **not** operate on disjoint subsets: they access the same 2Ă—2 tile. `operatesOnDisjointSubset` would therefore return false for both pairs, but only the first read recovers the inserted value unchanged.

```text
v = [[1, 2], [3, 4]]

// Matching layouts.
t1 = write(t0, v, map = identity)
r1 = read(t1, map = identity)
// r1 = [[1, 2], [3, 4]] == v

// Different layouts.
t2 = write(t0, v, map = transpose)
r2 = read(t2, map = identity)
// r2 = [[1, 3], [2, 4]] != v
```

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


More information about the Mlir-commits mailing list