From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27297 invoked by alias); 5 Apr 2004 13:55:52 -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 27136 invoked by uid 48); 5 Apr 2004 13:55:49 -0000 Date: Mon, 05 Apr 2004 13:55:00 -0000 From: "uros at kss-loka dot si" To: gcc-bugs@gcc.gnu.org Message-ID: <20040405135542.14851.uros@kss-loka.si> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/14851] New: suboptimal fp division X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg00413.txt.bz2 List-Id: Floating point division in current CVS gcc expands x/x into (1/x)*x. This testcase: double test(double x) { return x/x; } is with gcc 3.5.0 20040405 (experimental) with -O2 -ffast-math compiled to: test: pushl %ebp movl %esp, %ebp fldl 8(%ebp) fld1 fdiv %st(1), %st popl %ebp fmulp %st, %st(1) ret And with gcc 3.2 20020903 (Red Hat Linux 8.0 3.2-7): test: pushl %ebp movl %esp, %ebp fldl 8(%ebp) fdiv %st(0), %st leave ret -- Summary: suboptimal fp division Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: uros at kss-loka dot si CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14851