rscottmanley wrote: I would suggest adding a test case with 2d loops where inner can be converted but outer cannot be. And another where the outer loop is affine on its own but the inner is not and prevents the outer from being converted. https://github.com/llvm/llvm-project/pull/152925