public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: Casey Leedom <casey_leedom@yahoo.com>
Cc: Joe Buck <jbuck@synopsys.com>,
	dann@godzilla.ics.uci.edu, mark@codesourcery.com,
	gcc@gcc.gnu.org, dan@dberlin.org, jh@suse.cz, aj@suse.de
Subject: Re: SPEC2000 252.eon generates invalid results when compiled -O3 with g++ 3.3
Date: Fri, 28 Mar 2003 00:04:00 -0000	[thread overview]
Message-ID: <20030327232433.GD22572@kam.mff.cuni.cz> (raw)
In-Reply-To: <20030327230357.9311.qmail@web13107.mail.yahoo.com>

> --- Joe Buck <jbuck@synopsys.com> wrote:
> > On Thu, Mar 27, 2003 at 01:35:42PM -0800, Casey Leedom wrote:
> > >   I'm trying to track down a patch for what appears to be a g++ 3.3
> > > optimization bug with the SPEC2000 252.eon benchmark.  When I compile this
> > > "-m32 -O0" or "-m64 -O3" I get correct results.  But if I use anything
> > other
> > > than -O0 with -m32 I end up with incorrect results.  Is anyone aware of
> > this
> > > bug and is there a patch available for it?  Thanks!
> > 
> > You don't mention a platform, but since you mention -m64 I guess sparc.
> > Right?  Also, is there a PR for this?
> 
>   Actually this is an Opteron system so I'm using the x86 and x86-64 stuff from
> gcc 3.3 provided by AMD.

The problem actually is that 386 uses x87 for FP operations that does
use 80bit values for temporaries.  The eon depends on roundoff errors
and thus get slightly different results.
The way to fix it is to ldpreload simple constructor that does set
control word to 64bits like windows does.

Honza
> 
>   I've been away from the gcc world for quite some time so I'm not sure how
> problem reports are being handled these days or how to search the database.  (I
> am of course more than willing to learn!)  There is a comment in the
> configuration file for x86 linux that has the following in it:
> 
> -----<BEGIN EXCERPT config/ia32-linux-gcc.cfg>-----
> ...
> 252.eon=default=default=default:
> EXTRA_CXXFLAGS=-DHAS_ERRLIST
> OPTIMIZE=-O0
> # Optimization level -g or -O0 must be used to obtain
> # a valid reference run using the default compilers on
> # the RedHat 5.2 distribution for Intel
> # the RedHat 6.0 distribution for Intel
> # the Suse 6.1 distribution for Intel
> # if GCC 2.95.1 or later is used the the suggested default
> # optimization level of -O3 -fomit-frame-pointer may be used
> # by commenting out the line OPTIMIZE=-O0 in the stanza for 252.eon above.
> ...
> -----<END EXCERPT config/ia32-linux-gcc.cfg>-----
> 
> As I mentioned in my first message, using -O3 -m64 works fine, but I can't use
> anything other than -O0 with -m32.  The code does compile, it just generates
> invalid results.  It looks like some bad floating point optimizations have been
> done.  I'll run this on a different CPU just to be sure.
> 
> Casey
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com

  reply	other threads:[~2003-03-27 23:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-27 23:21 Casey Leedom
2003-03-27 23:47 ` Joe Buck
2003-03-27 23:49   ` Casey Leedom
2003-03-28  0:04     ` Jan Hubicka [this message]
2003-03-28  0:19       ` Casey Leedom
2003-03-28  4:21       ` Casey Leedom
2003-03-28  7:49         ` Jan Hubicka
2003-03-28 23:57           ` Casey Leedom
2003-03-29  5:19             ` Jan Hubicka
2003-03-29  8:27             ` Jan Hubicka
2003-03-29  9:49             ` Andreas Jaeger
2003-03-28  0:58     ` Vladimir Makarov
2003-03-28 11:58 ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030327232433.GD22572@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=aj@suse.de \
    --cc=casey_leedom@yahoo.com \
    --cc=dan@dberlin.org \
    --cc=dann@godzilla.ics.uci.edu \
    --cc=gcc@gcc.gnu.org \
    --cc=jbuck@synopsys.com \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).