From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27042 invoked by alias); 15 Mar 2004 18:12:15 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 27031 invoked from network); 15 Mar 2004 18:12:14 -0000 Received: from unknown (HELO ms-smtp-03.nyroc.rr.com) (24.24.2.57) by sources.redhat.com with SMTP; 15 Mar 2004 18:12:14 -0000 Received: from doctormoo (syr-24-59-115-225.twcny.rr.com [24.59.115.225]) by ms-smtp-03.nyroc.rr.com (8.12.10/8.12.10) with ESMTP id i2FICBT9012925; Mon, 15 Mar 2004 13:12:11 -0500 (EST) Received: by doctormoo (Postfix, from userid 1000) id 43EA745BC6; Mon, 15 Mar 2004 13:12:22 -0500 (EST) Date: Mon, 15 Mar 2004 18:12:00 -0000 To: coyote@coyotegulch.com Cc: gcc@gcc.gnu.org Subject: Re: GCC viciously beaten by ICC in (poorly designed) trig test! Message-ID: <20040315181222.GA1448@twcny.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i From: neroden@twcny.rr.com (Nathanael Nerode) X-Virus-Scanned: Symantec AntiVirus Scan Engine X-SW-Source: 2004-03/txt/msg00729.txt.bz2 Scott Robert Ladd wrote: >Using both GCC 3.3.3 and Intel C++ 8.0, I compiled the above with these command lines: > > > gcc -o sincosg -lm -std=gnu99 -O3 -march=pentium4 \ > -mfpmath=387 -ffast-math -fomit-frame-pointer sincos.c ^^^^^^^^^^^^ > icc -o sincosi -lm -O3 -xN -tpp7 -ipo sincos.c >Examining the generated assembler source shows that Intel eliminates the >function call to "doit()" entirely, replacing it with inline code that >calls internal functions such as vmldSin2 and vmldCos2, Did you try marking doit inline? >while it's actual >compilation of doit() uses the SSE2 sincos instruction, whereas GCC >generates calls to the 387 instructions fsin and fcos. Well, duh, given the command line options. > -mfpmath=sse Did this change the generated assembler to use the sse instructions? It probably should have, and if it didn't, that's probably a bug. -- Make sure your vote will count. http://www.verifiedvoting.org/