From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4122 invoked by alias); 18 Jul 2012 12:09:40 -0000 Received: (qmail 4109 invoked by uid 22791); 18 Jul 2012 12:09:38 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Jul 2012 12:09:25 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53957] Polyhedron 11 benchmark: MP_PROP_DESIGN twice as long as other compiler Date: Wed, 18 Jul 2012 12:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Component Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-07/txt/msg01393.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53957 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |fortran --- Comment #3 from Richard Guenther 2012-07-18 12:09:23 UTC --- The issue seems to be that the frontend uses two induction variables, one signed and one unsigned, for DO i = 1 , 1 + NINT(2.0D0*PI*trns/dphit) , & & NINT(ainc/(dphit*(180.0D0/PI))) ... END DO : # i_5 = PHI <[mp_prop_design.f90 : 697:0] 1(77), [mp_prop_design.f90 : 696:0] i_621(79)> # countm1.38_32 = PHI <[mp_prop_design.f90 : 696:0] countm1.38_466(77), [mp_prop_design.f90 : 696:0] countm1.38_622(79)> # prephitmp.386_3285 = PHI # prephitmp.386_3287 = PHI ... [mp_prop_design.f90 : 696:0] i_621 = i_5 + pretmp.378_3242; [mp_prop_design.f90 : 696:0] # DEBUG i => i_621 [mp_prop_design.f90 : 696:0] if (countm1.38_32 == 0) goto ; else goto ; : [mp_prop_design.f90 : 696:0] countm1.38_622 = countm1.38_32 + 4294967295; [mp_prop_design.f90 : 696 : 0] goto ; and the "decrement" of countm1 happens in the loop latch block. It would be better to have this similar to other loops I see, bool flag = end-value == i; i = i + 1; if (flag) goto loop_exit;