https://github.com/jopperm approved this pull request. Thanks for iterating! Please consider adding one test with a non-permuted-projection affine map. Otherwise this looks great now. https://github.com/llvm/llvm-project/pull/167626