https://github.com/MaheshRavishankar commented: Interesting. I think it "should" work even with negative indices. What is the error you were hitting? (I can try this locally as well in a bit). https://github.com/llvm/llvm-project/pull/114688