hiraditya added a comment. @eli.friedman I have updated the loop rotation to add a metadata if the loop rotation was successful, such that it does not rotate the loop multiple times. https://reviews.llvm.org/D22630