[PATCH 3/5] checksum: use pre increment.
Joakim Tjernlund
joakim.tjernlund at transmode.se
Sun Apr 25 23:40:51 CEST 2010
Martin Mares <mj at 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
More information about the Bird-users
mailing list