From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10060 invoked by alias); 29 Jul 2003 13:01:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10046 invoked by alias); 29 Jul 2003 13:01:18 -0000 Date: Tue, 29 Jul 2003 13:01:00 -0000 Message-ID: <20030729130118.10045.qmail@sources.redhat.com> From: "rguenth at tat dot physik dot uni-tuebingen dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030729120327.11706.rguenth@tat.physik.uni-tuebingen.de> References: <20030729120327.11706.rguenth@tat.physik.uni-tuebingen.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/11706] std::pow(T, int) implementation pessimizes code X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg03330.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11706 ------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2003-07-29 13:01 ------- Subject: Re: std::pow(T, int) implementation pessimizes code On 29 Jul 2003, steven at gcc dot gnu dot org wrote: > Richard, can you test this and see if it helps? It's still not as good as > pow(x,2)->x*x but it's darn close and with loop unrolling it might even get to that. Given recent discussion on gcc list and gcc3.4s ability to optimize ::pow, we should just drop __pow_helper() and __cmath_power() and change inline double std::pow(double __x, int __i) { return __pow_helper(__x, __i); } to inline double std::pow(double __x, int __i) { return ::pow(__x, __i); } Maybe for all other overloads, too. Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/