That's a nice little optimisation! Would you mind sharing the aarch64 assembly from before and after applying the optimisation? It would be good to know the compiler flags used too :)
OT, but, this account seems to be reposting comments from the original article as HN comments. I wonder if it's automatic or manual. Regardless, it doesn't really seem to work (-6 karma as per the writing of this comment).