From: Vladimir Makarov <vmakarov@redhat.com>
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:58:00 -0000 [thread overview]
Message-ID: <3E838B6C.33B251EE@redhat.com> (raw)
In-Reply-To: <20030327230357.9311.qmail@web13107.mail.yahoo.com>
Casey Leedom wrote:
>
> --- 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.
>
> 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.
>
IMHO, EON is placed into SPECInt2000 by mistake. It heavily uses
floating point numbers, vector and matrixes. It is a typical SPECFP
stuff.
The problem may be in usage x86 floating point stack with 80-bit
floating point numbers without conversion them into 64-bit ones. The
calculation error (as I understand it is a ray tracing recurrent
algorithm, therefore the discrepancy can be big) is accumulated and
results in different from the expected one.
When -O0 is used, fp reg values are converted into 64-bit ones during
storing in memory. You could try to use -ffloat-store or just ignore
the mistake by changing abstol value in object.pm for eon.
Vlad
next prev parent reply other threads:[~2003-03-27 23:38 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
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 [this message]
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=3E838B6C.33B251EE@redhat.com \
--to=vmakarov@redhat.com \
--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=jh@suse.cz \
--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).