From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29443 invoked by alias); 16 Jul 2012 14:57:14 -0000 Received: (qmail 29433 invoked by uid 22791); 16 Jul 2012 14:57:13 -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; Mon, 16 Jul 2012 14:56:59 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53967] GCC produces slow code for convolution algorithm with -mfpmath=sse (the AMD_64 default) Date: Mon, 16 Jul 2012 14:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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/msg01238.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53967 --- Comment #9 from Richard Guenther 2012-07-16 14:56:59 UTC --- (In reply to comment #8) > I used -march=native in this case. It is interesting that this enabled AVX > (this particular CPU does support it). > > To be clear, the problem also occurs with > > -m64 -mtune=generic -march=x86-64 -mfpmath=sse > > vs > > -m64 -mtune=generic -march=x86-64 -mfpmath=387 > > and is also observed on a 5-year old Opteron. > > With GCC 4.7.1, and for a specific application benchmark case and with generic > architecture and tuning, -mfpmath=387 produces 0.133 iter/s and -mfpmath=sse > produces 0.047 iter/s. A different (non-GCC) compiler on the same system > produces 0.155 iter/s. > > In the course of testing, I have indeed tried -march=corei7 and it did not > provide an improvement. What kind of optimization options are you using? -O3? Or are you really using -O0 (aka nothing)?