http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58626
--- Comment #3 from Richard Biener ---
I have updated my do-proper-partition-dependencies patch and verified it fixes
this issue. We now generate
:
__builtin_memmove (&MEM[(void *)&a + 24B], &MEM[(void *)&a + 48B], 8);
:
# b.0_10 = PHI
a[1][3] = 0;
_25 = a[3][b.0_10];
a[2][b.0_10] = _25;
b.1_12 = b.0_10 + 1;
if (b.1_12 <= 1)
goto ;
else
goto ;
:
goto ;
:
b = 2;
_14 = a[1][1];
if (_14 != 1)
note the inner loop is completely peeled before loop distribution and we see
:
# b.0_10 = PHI
a[1][3] = 0;
_19 = a[2][b.0_10];
a[1][b.0_10] = _19;
_25 = a[3][b.0_10];
a[2][b.0_10] = _25;
b.1_12 = b.0_10 + 1;
if (b.1_12 <= 1)
the patch still needs quite some TLC though.