From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29354 invoked by alias); 23 Oct 2009 19:54:21 -0000 Received: (qmail 29335 invoked by uid 22791); 23 Oct 2009 19:54:21 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f221.google.com (HELO mail-ew0-f221.google.com) (209.85.219.221) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Oct 2009 19:54:14 +0000 Received: by ewy21 with SMTP id 21so7866087ewy.8 for ; Fri, 23 Oct 2009 12:54:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.210.106.12 with SMTP id e12mr3331632ebc.11.1256327652114; Fri, 23 Oct 2009 12:54:12 -0700 (PDT) In-Reply-To: <20091023194615.26530.qmail@sourceware.org> References: <20091023194615.26530.qmail@sourceware.org> From: Sebastian Pop Date: Fri, 23 Oct 2009 19:54:00 -0000 Message-ID: Subject: Re: [Bug tree-optimization/41811] graphite miscompiles 454.calculix of the SPEC 2k6 To: gcc-bugzilla@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg02055.txt.bz2 On Fri, Oct 23, 2009 at 14:46, spop at gcc dot gnu dot org wrote: > and the code generated by CLooG for the interchange looks like this: > > for (scat_1=3D0;scat_1<=3D2;scat_1++) { > =C2=A0for (scat_3=3D0;scat_3<=3D2;scat_3++) { > =C2=A0 =C2=A0S4(scat_1,scat_3) ; > =C2=A0 =C2=A0for (scat_5=3D0;scat_5<=3D2;scat_5++) { > =C2=A0 =C2=A0 =C2=A0S5(scat_1,scat_5,scat_3) ; > =C2=A0 =C2=A0} > =C2=A0 =C2=A0S7(scat_1,scat_3) ; > =C2=A0 =C2=A0S18(scat_1,scat_3) ; > =C2=A0} S7 and S18 should not be generated before S5 finishes to execute over all the iterations of the original innermost loop (do k=3D1,20). S7 and S18 contain the end of the reduction and the write in the array xs(i,j) that is independent of the k loop. > =C2=A0for (scat_3=3D3;scat_3<=3D19;scat_3++) { > =C2=A0 =C2=A0for (scat_5=3D0;scat_5<=3D2;scat_5++) { > =C2=A0 =C2=A0 =C2=A0S5(scat_1,scat_5,scat_3) ; > =C2=A0 =C2=A0} > =C2=A0} > }