From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16619 invoked by alias); 6 Feb 2004 07:45:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16606 invoked by uid 48); 6 Feb 2004 07:45:45 -0000 Date: Fri, 06 Feb 2004 07:45:00 -0000 From: "tjw at omnigroup dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20040206074537.14042.tjw@omnigroup.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/14042] New: C++ abstraction penalty is high in simple cases X-Bugzilla-Reason: CC X-SW-Source: 2004-02/txt/msg00742.txt.bz2 List-Id: The attached test case shows nearly identical loops, the only difference being that one operates on two objects per loop and the other just one. The iterate_ok() function generates a nice all-register loop like: L16: vaddfp v1,v13,v0 vmaddfp v13,v1,v13,v0 vsubfp v0,v1,v0 bdnz L16 The iterate_bad() function generates tons of load/store operations: L41: lvx v0,r9,r0 vaddfp v1,v9,v10 lvx v13,r9,r2 vaddfp v12,v13,v0 vmaddfp v9,v1,v9,v10 stvx v1,0,r11 vsubfp v10,v1,v10 vsubfp v11,v12,v0 stvx v12,0,r9 vmaddfp v13,v12,v13,v0 stvx v11,r9,r0 stvx v13,r9,r2 bdnz L41 I don't know if this is specific to Altivec, I would assume it isn't, but my real program that is getting clobbered by this is Altivec-based. -- Summary: C++ abstraction penalty is high in simple cases Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tjw at omnigroup dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-apple-darwin7.2.0 GCC host triplet: powerpc-apple-darwin7.2.0 GCC target triplet: powerpc-apple-darwin7.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14042