https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111680
--- Comment #8 from King Lok Chung <king.chung at manchester dot ac.uk> --- It also looks like to me that the compiler is trying to be smart and save one register use by reusing the SP, resulting in two SP offsets. In reality, it could have used a6 or a7 easily. Or might be the SP value is similar to the pointer address, which the compiler trying take advantage of? This is just pure guessing.