llvm-project
c1a241f0 - [mlir][affine] Fix sibling fusion with multiple loads (#226759)

Commit
4 days ago
[mlir][affine] Fix sibling fusion with multiple loads (#226759) Sibling fusion missed nests that load the shared memref more than once, e.g. two loops that both read `A[i]` and `A[i + 1]`. Such siblings were filtered out, and even when one of the nests had a single load, the slice was computed as the union over all load pairs. That union spans several source iterations per destination iteration and gets rejected as an incorrect slice. Sibling nests don't depend on each other, so compute the slice from a single pair of loads instead, preferring one that gives a maximal slice, and drop the single-load restriction. Fixes #219356 Used Claude to help with helper function and tests
Author
Parents
Loading