From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5099 invoked by alias); 5 Sep 2012 21:46:37 -0000 Received: (qmail 5089 invoked by uid 22791); 5 Sep 2012 21:46:36 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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, 05 Sep 2012 21:46:23 +0000 From: "pthaugen at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/54497] New: Revision 190015 causes 22% degradation on 172.mgrid on PowerPC Date: Wed, 05 Sep 2012 21:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pthaugen at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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-09/txt/msg00409.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54497 Bug #: 54497 Summary: Revision 190015 causes 22% degradation on 172.mgrid on PowerPC Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: pthaugen@gcc.gnu.org CC: bergner@gcc.gnu.org, dehao@gcc.gnu.org Host: powerpc64-linux Target: powerpc64-linux Build: powerpc64-linux Created attachment 28135 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28135 Reduced testcase Starting with revision 190015 I'm seeing a major degradation on cpu2000 benchmark 172.mgrid. The core loop of the benchmark is in procedure RESID(). The main differences I see in the tree dumps, compared with the prior revision, which result in the degradation are the following. 1) IPA-CP creates a clone of RESID to be used at certain call sites. 2) Predictive Commoning doesn't optimize the hot loop in the cloned version of RESID. The attatched testcase was reduced from mgrid.f and can be compiled with gfortran -S -m64 -O3 -mcpu=power7 -mno-vsx -fno-inline. In the original version, resid_, predictive commoning has unrolled the loop by a factor of 2 so that memory refs can be resued (hot loop has 20 loads and 2 stfd). In the cloned version, resid_.constprop.0, no predictive commoning is done and we end up with a single copy of the the loop with 32 loads and a single store.