5.7.7.30 Loop-rename-registers Option

The -mloop-rename-registers option reallocates values that are referenced inside a loop and that are stored in high-numbered registers (r8-r15) to low-numbered registers (r0 - r7) that are not otherwise used in the loop. High-numbered registers are not accessible to all 16-bit instructions and avoiding these registers allows more efficient instructions, such as cbz/cbnz, to be used more often. This option is automatically enabled when using -O2 or -O3.

The -mloop-rename-registers form of this option does not reallocate register contents within loops.