https://github.com/fhahn commented: Thanks for putting up the PR, this was an extension I had in mind when I generalized the logic. Could you also add a negative test case (different strides, but not safe)? https://github.com/llvm/llvm-project/pull/98142