25 Apr
2010
25 Apr
'10
9:40 p.m.
Martin Mares <mj@ucw.cz> wrote on 2010/04/25 23:33:49:
Some archs(RISC like archs) can do pre increment and load in one insn but gcc optimization often fails to take advantage of that. Help gcc to do the right thing by using pre increment instead of post increment.
This one is a little bit dubious, I would rather not twist the code so much in order to help a specific version of GCC. I guess that this will vary wildly between GCC versions.
Sadly not, I have used 2.95, 3.4.6 and 4.3.4 and PowerPC still doesn't get it right. I agree that gcc SHOULD fix this but in real life it doesn't so I always help gcc when it comes to loops such as these. Jocke