> 1. revert the regression-causing patch on the branch and apply Richards
> patch only instead (if you can confirm that's enough to fix the K6 bug)
Doing so indeed causes the K6 bug to vanish, because the loop is now properly
unrolled 4 times and GCC doesn't need to do a runtime calculation of the
number of iterations anymore. Moreover constructs like:
for (i=0; i <n; i++)
array[i] = 0;
seem to be properly unrolled too.
> 2. apply Richard's and Dale's patch on the branch
>
> Currently I'm leaning towards #2 as we are still very early in the 3.2.2
> phase.
Seems like unavoidable, if the code quality is as bad as that of the
K6-compiled testcase.
OK, the addition of Richards patch fixed the regression on
powerpc-linux-gnu and didn't cause any new regressions on powerpc-linux-gnu
or i686-linux-gnu.