From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23537 invoked by alias); 19 Dec 2002 21:40:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23528 invoked from network); 19 Dec 2002 21:40:12 -0000 Received: from unknown (HELO mail.libertysurf.net) (213.36.80.91) by 209.249.29.67 with SMTP; 19 Dec 2002 21:40:12 -0000 Received: from localhost.localdomain (212.83.141.210) by mail.libertysurf.net (6.5.026) id 3DE3A3320037069F; Thu, 19 Dec 2002 22:39:53 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Eric Botcazou To: Richard Henderson Subject: Re: Patch: fix SPEC regressions Date: Thu, 19 Dec 2002 13:40:00 -0000 User-Agent: KMail/1.4.1 Cc: gcc-patches@gcc.gnu.org, Dale Johannesen References: <1C457790-EAAD-11D6-B8DA-000393D76DAA@apple.com> <200212171428.25955.ebotcazou@libertysurf.fr> <20021219211442.GA10484@redhat.com> In-Reply-To: <20021219211442.GA10484@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212192236.38886.ebotcazou@libertysurf.fr> X-SW-Source: 2002-12/txt/msg01050.txt.bz2 > Why doesn't this test case fail on mainline? Because of your patch on mainline: 2002-07-21 Richard Henderson * 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 =3D 0; i < 4; i++) array[i] =3D 0; on K6 at -O2 -funroll-loops: we first strength-reduce, which makes us lose = the=20 number of iterations, then unroll using the default number of iterations (8= ),=20 which is later changed to 4 because we are preconditioning the loop. Then w= e=20 generate a runtime calculation of the number of iterations really needed (!= ). With your patch we unroll 4 times, period. --=20 Eric Botcazou