On Thu, Apr 2, 2015 at 3:19 AM, Edward Nevill edward.nevill@linaro.org wrote:
Looking at the disassembly I see it is using FP registers to hold integer values. The following is a small extract.
-O3 turns on -finline-functions, which causes a lot of code expansion. That, combined with the fact that we end up with a call in the middle of a loop, and most values have lifetimes that cross the call, means that it runs out of registers, and needs to spill. The compiler is then choosing to use FP registers for spills instead of storing/loading to/from the stack. I'm not seeing the same behaviour from the FSF GCC mainline, nor from the linaro-4.9 branch. These are both spilling to stack instead of FP registers.
This appears to be FSF GCC Bug 61915 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61915 which was fixed in November and back ported to our linaro branch last month.
Jim