https://github.com/jinisusan commented: LGTM except for a nit: The comment at line 19 should instead be changed to: "For each dimension, find the offsets of count, lower bound and stride in the ..." https://github.com/llvm/llvm-project/pull/106703