From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6418 invoked by alias); 16 Mar 2004 13:31:23 -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 6338 invoked from network); 16 Mar 2004 13:31:21 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sources.redhat.com with SMTP; 16 Mar 2004 13:31:21 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i2GBLnki015561; Tue, 16 Mar 2004 12:21:49 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i2GBLm2A015555; Tue, 16 Mar 2004 12:21:48 +0100 Date: Tue, 16 Mar 2004 13:31:00 -0000 From: Jakub Jelinek To: Joe Buck Cc: James Morrison , Roger Sayle , Scott Robert Ladd , gcc@gcc.gnu.org Subject: Re: GCC viciously beaten by ICC in trig test! Message-ID: <20040316112148.GU3822@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: <20040315061104.GR3822@sunsite.ms.mff.cuni.cz> <20040315101313.A4286@synopsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040315101313.A4286@synopsys.com> User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00805.txt.bz2 On Mon, Mar 15, 2004 at 10:13:13AM -0800, Joe Buck wrote: > On Mon, Mar 15, 2004 at 07:11:04AM +0100, Jakub Jelinek wrote: > > Well, the inlines shouldn't be removed, but guarded with > > # if !__GNUC_PREREQ (MAJOR,MINOR) > > ... > > # endif > > where MAJOR, MINOR is the first __GNUC__ and __GNUC_MINOR__ of GCC which > > can handle all cases the same or better than the glibc inline. > > Is the proper requirement "all cases"? What if the glibc inline is > sometimes better, but sometimes far worse? Ok, all cases is not necessary, but good judgement needs to be applied. I've tried to look at a few inlines today, e.g. signbit in GCC is as good as glibc builtin, which means __builtin_signbit should be used, but already on IA-32 __builtin_signbitl is worse. Although GCC 3.5 has really many math builtins, most of them do nothing and thus are usually worse than what GLIBC provides (tried e.g. exp, tan). Jakub