From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13420 invoked by alias); 18 Jul 2012 11:26:10 -0000 Received: (qmail 13369 invoked by uid 22791); 18 Jul 2012 11:26:09 -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 11:25:56 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/53957] Polyhedron 11 benchmark: MP_PROP_DESIGN twice as long as other compiler Date: Wed, 18 Jul 2012 11:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end 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: Status Last reconfirmed Ever Confirmed 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/msg01388.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53957 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-07-18 Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther 2012-07-18 11:25:55 UTC --- On trunk we do vectorize the loop at 552, but I'm not sure that unconditionally calling vmldAtan2 is profitable. That is, trunk for me has (-Ofast -mveclibabi=svml): 552: LOOP VECTORIZED. 576: LOOP VECTORIZED. 662: LOOP VECTORIZED. 1032: LOOP VECTORIZED. 1060: LOOP VECTORIZED. The loop at 639 is converted to two memset calls. mp_prop_design.f90(677): (col. 16) remark: PARTIAL LOOP WAS VECTORIZED. (Line number points to the outermost of the three loops; there are also conditional jumps) seems to be the important one to tackle. For the loop at 818 we fail to if-convert the nested if IF ( j.EQ.1 ) THEN tempa(j) = ZERO ELSE arg1 = -vefz(j) arg2 = vefphi(j) IF ( (arg2.LT.ZERO) .OR. (arg2.GT.ZERO) ) THEN tempa(j) = ATAN(arg1/arg2) - theta(j) ELSE tempa(j) = -theta(j) ENDIF ENDIF where we also fail to apply store-motion of tempa(j). The if (j == 1) conditional code makes the loop suitable for peeling, too. That said, this loop is suitable for analysis as well.