This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: fix SPEC regressions
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org,Dale Johannesen <dalej at apple dot com>
- Date: Thu, 19 Dec 2002 22:36:38 +0100
- Subject: Re: Patch: fix SPEC regressions
- References: <1C457790-EAAD-11D6-B8DA-000393D76DAA@apple.com> <200212171428.25955.ebotcazou@libertysurf.fr> <20021219211442.GA10484@redhat.com>
> Why doesn't this test case fail on mainline?
Because of your patch on mainline:
2002-07-21 Richard Henderson <rth@redhat.com>
* loop.h (LOOP_AUTO_UNROLL): Rename from LOOP_FIRST_PASS.
* loop.c (strength_reduce): Update.
* toplev.c (rest_of_compilation): Do unrolling in the first
loop pass, not the second.
On the 3.2 branch, we generate very bad code for
for (i = 0; i < 4; i++)
array[i] = 0;
on K6 at -O2 -funroll-loops: we first strength-reduce, which makes us lose the
number of iterations, then unroll using the default number of iterations (8),
which is later changed to 4 because we are preconditioning the loop. Then we
generate a runtime calculation of the number of iterations really needed (!).
With your patch we unroll 4 times, period.
--
Eric Botcazou