http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48789
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ramana at gcc dot gnu.org --- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-07-27 16:40:09 UTC --- There are a number of problems and not all of them are related to the backend. - ldm / stm aren't really first class citizens as far as GCC is concerned . There is no way today of getting the register allocator to forcefully use increasing addresses as a metric of choosing where to do what. - I suspect the performance issues you are seeing are with the number of spills and fills that are being generated in this case. If you tried -fsched-pressure life becomes much better and in fact the amount of stack space used is 0 . I haven't run any benchmarks to see if in this particular case you get better performance .