public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14851] New: suboptimal fp division
@ 2004-04-05 13:55 uros at kss-loka dot si
  2004-04-05 15:06 ` [Bug optimization/14851] [3.5 Regression] suboptimal fp division with -ffast-math pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: uros at kss-loka dot si @ 2004-04-05 13:55 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-12-24 19:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-05 13:55 [Bug optimization/14851] New: suboptimal fp division uros at kss-loka dot si
2004-04-05 15:06 ` [Bug optimization/14851] [3.5 Regression] suboptimal fp division with -ffast-math pinskia at gcc dot gnu dot org
2004-09-17  6:08 ` [Bug rtl-optimization/14851] [4.0 " uros at gcc dot gnu dot org
2004-09-17  6:09 ` uros at gcc dot gnu dot org
2004-09-21  5:11 ` cvs-commit at gcc dot gnu dot org
2004-09-21  5:17 ` uros at kss-loka dot si
2004-09-27  9:19 ` uros at kss-loka dot si
2004-10-04  7:51 ` bonzini at gcc dot gnu dot org
2004-10-04  9:40 ` giovannibajo at libero dot it
2004-10-05  5:58 ` uros at kss-loka dot si
2004-12-24 19:27 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).