From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16262 invoked by alias); 15 Mar 2004 02:22:18 -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 16226 invoked from network); 15 Mar 2004 02:22:05 -0000 Received: from unknown (HELO scanner2.ics.uci.edu) (128.195.1.36) by sources.redhat.com with SMTP; 15 Mar 2004 02:22:05 -0000 Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.12.10/8.12.10) with ESMTP id i2F2LQ4J018909; Sun, 14 Mar 2004 18:21:26 -0800 (PST) Message-Id: <200403150221.i2F2LQ4J018909@scanner2.ics.uci.edu> To: Roger Sayle Cc: gcc@gcc.gnu.org Subject: Re: GCC viciously beaten by ICC in trig test! References: <4054ED19.8020009@coyotegulch.com> From: Dan Nicolaescu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 15 Mar 2004 02:22:00 -0000 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-96.69, required 5, MSGID_FROM_MTA_SHORT, USER_IN_WHITELIST) X-SW-Source: 2004-03/txt/msg00644.txt.bz2 Roger Sayle writes: > without it, the same "-O2 -ffast-math -fomit-frame-pointer" options' > output is identical to the output from Intel v7.0 (and presumably later). > > foo: fldl 4(%esp) > fsin > fmul %st(0), %st > ret Intel 8.0 (that was used in the original test) generates something very different: # parameter 1: 8 + %ebx ..B1.1: # Preds ..B1.0 pushl %ebx #5.1 movl %esp, %ebx #5.1 andl $-8, %esp #5.1 subl $8, %esp #5.1 movsd 8(%ebx), %xmm0 #7.15 call __libm_sse2_sincos #7.15 # LOE ebp esi edi xmm0 xmm1 ..B1.4: # Preds ..B1.1 mulsd %xmm1, %xmm1 #10.25 mulsd %xmm0, %xmm0 #10.15 addsd %xmm1, %xmm0 #10.25 movsd %xmm0, (%esp) #10.25 fldl (%esp) #10.25 movl %ebx, %esp #10.25 popl %ebx #10.25 ret #10.25 __libm_sse2_sincos seems to be an iterative SSE function. I guess the mystery is solved now.