From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14807 invoked by alias); 29 Jul 2003 13:14: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 14795 invoked from network); 29 Jul 2003 13:14:12 -0000 Received: from unknown (HELO mx02.uni-tuebingen.de) (134.2.3.12) by sources.redhat.com with SMTP; 29 Jul 2003 13:14:12 -0000 Received: from bellatrix.tat.physik.uni-tuebingen.de (bellatrix.tat.physik.uni-tuebingen.de [134.2.170.113]) by mx02.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id h6TDEABw002951; Tue, 29 Jul 2003 15:14:10 +0200 Received: from bellatrix.tat.physik.uni-tuebingen.de (localhost [127.0.0.1]) by bellatrix.tat.physik.uni-tuebingen.de (8.12.3/8.12.2/SuSE Linux 0.6) with ESMTP id h6TDEAKA005071; Tue, 29 Jul 2003 15:14:10 +0200 Received: from localhost (rguenth@localhost) by bellatrix.tat.physik.uni-tuebingen.de (8.12.3/8.12.3/Submit) with ESMTP id h6TDEAmA005068; Tue, 29 Jul 2003 15:14:10 +0200 X-Authentication-Warning: bellatrix.tat.physik.uni-tuebingen.de: rguenth owned process doing -bs Date: Tue, 29 Jul 2003 14:14:00 -0000 From: Richard Guenther To: Steven Bosscher cc: Paolo Carlini , Gabriel Dos Reis , Subject: Re: std::pow implementation In-Reply-To: <1059483713.3650.148.camel@steven.lr-s.tudelft.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-AntiVirus: checked by AntiVir Milter 1.0.2; AVE 6.20.0.1; VDF 6.20.0.50 X-SW-Source: 2003-07/txt/msg01985.txt.bz2 On 29 Jul 2003, Steven Bosscher wrote: > Op di 29-07-2003, om 14:55 schreef Richard Guenther: > > double foo2(double x) > > { > > pow(x, 2); > > } > > > > Not that it didn't even unroll the loop at all. > > I have no idea if it makes any difference, I'm just curious: What > happens if you replace > > while (__n >>= 1) > > with > while (__n = __n / 2) > ? > > Maybe the loop stuff can't handle shifts... It doesnt handle __n /= 2 either. So we're lost in optimizing this, it seems (-fold-unroll-loops is not better either). Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/