------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-13 17:54 ------- For PPC at least IV-OPTS should note that we have post increment and decrement the pointers before the loop and then increment all of them inside the loop, aka: void fcpy(float *restrict a, float *restrict b, float *restrict aa, float *restrict bb, unsigned n) { unsigned i; aa-=1; a-=1; bb-=1; b-=1; for(i = 0; i < n; i++) { aa+=1; a+=1; bb+=1; b+=1; *bb=*b; *aa=*a; } } So we get: L4: lfsu f0,4(r4) lfsu f13,4(r3) stfsu f0,4(r6) stfsu f13,4(r5) bdnz L4 which is the most optimal for PPC
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18463