------- Additional Comments From rguenth at gcc dot gnu dot org 2005-07-26 13:29 ------- For a reduced array with only 4 elements (I know - this should be a --param) we now get in .vars (with the array aliasing patch):
f (n) { int n.39; unsigned int ivtmp.33; int lsm_tmp.32; int lsm_tmp.31; int lsm_tmp.30; int lsm_tmp.29; <bb 0>: n.39 = n - 1; if (n.39 != 0) goto <L6>; else goto <L2>; <L6>:; lsm_tmp.29 = r[2]; lsm_tmp.30 = r[1]; lsm_tmp.31 = r[3]; lsm_tmp.32 = r[0]; ivtmp.33 = 0; <L0>:; lsm_tmp.32 = lsm_tmp.32 + lsm_tmp.31; lsm_tmp.30 = lsm_tmp.32 + lsm_tmp.30; lsm_tmp.29 = lsm_tmp.30 + lsm_tmp.29; lsm_tmp.31 = lsm_tmp.31 + lsm_tmp.29; ivtmp.33 = ivtmp.33 + 1; if (ivtmp.33 != (unsigned int) n.39) goto <L0>; else goto <L10>; <L10>:; r[2] = lsm_tmp.29; r[1] = lsm_tmp.30; r[3] = lsm_tmp.31; r[0] = lsm_tmp.32; <L2>:; return; } and the asm loop looks like .L4: addl %edx, %eax incl %esi addl %eax, %ecx addl %ecx, %ebx addl %ebx, %edx cmpl %edi, %esi jne .L4 as in exactly what you want. Don't hold your breath for 4.1, though. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2005-06-09 16:37:28 |2005-07-26 13:29:06 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19581