public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Roger Sayle <roger@www.eyesopen.com>
To: David Edelsohn <dje@watson.ibm.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Strange conditional jumps on the POWER4
Date: Sun, 06 Apr 2003 05:21:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0304051833030.27022-100000@www.eyesopen.com> (raw)
In-Reply-To: <200304060211.VAA31048@makai.watson.ibm.com>


Hi David,
> 	It appears that you are not compiling the code with -mcpu=power4
> commandline option for GCC 3.4, because the branch hint mnemonics (+/-)
> would not be present without greater probabilities.

Indeed, I used exactly the flags described in the posting.  Out of
interest, I've now also run Whetstone with "-mcpu=power4", hoping that
it would fix things.  Not only does this not fix the N3 regression, it
actually does slightly worse overall.


With gcc-3.2 -O2 -ffast-math:

Loop content                  Result              MFLOPS      MOPS   Seconds
N1 floating point     -1.12475025653839111       157.257              0.588
N2 floating point     -1.12274754047393799       130.235              4.970
N3 if then else        1.00000000000000000                 488.682    1.020
N4 fixed point        12.00000000000000000                 171.030    8.870
N5 sin,cos etc.        0.49904659390449524                  32.550   12.310
N6 floating point      0.99999988079071045        58.826             44.160
N7 assignments         3.00000000000000000                  92.323    9.640
N8 exp,sqrt etc.       0.75110864639282227                  10.374   17.270
MWIPS                                            487.311             98.828

With gcc-3.4 -O2 -ffast-math:

Loop content                  Result              MFLOPS      MOPS   Seconds
N1 floating point     -1.12475013732910156       189.658              0.582
N2 floating point     -1.12274742126464844       180.109              4.290
N3 if then else        1.00000000000000000                 214.037    2.780
N4 fixed point        12.00000000000000000                 186.310    9.720
N5 sin,cos etc.        0.49911010265350342                  33.102   14.450
N6 floating point      0.99999982118606567        72.217             42.940
N7 assignments         3.00000000000000000                 137.619    7.720
N8 exp,sqrt etc.       0.75110864639282227                  16.008   13.360
MWIPS                                            599.841             95.842

With gcc-3.4 -O2 -ffast-math -mcpu=power4

Loop content                  Result              MFLOPS      MOPS   Seconds
N1 floating point     -1.12475013732910156       190.647              0.582
N2 floating point     -1.12274742126464844       178.142              4.360
N3 if then else        1.00000000000000000                 214.382    2.790
N4 fixed point        12.00000000000000000                 204.308    8.910
N5 sin,cos etc.        0.49911010265350342                  33.647   14.290
N6 floating point      0.99999982118606567        71.627             43.520
N7 assignments         3.00000000000000000                  88.334   12.090
N8 exp,sqrt etc.       0.75110864639282227                  15.819   13.590
MWIPS                                            577.138            100.132


So as you can see the situation isn't too bad at all.  Overall gcc 3.4
is much faster than gcc 3.2.  But you can see my concern over the slow
down of N3, and that adding "-mcpu=power4" doesn't resolve the issue.

Roger
--

  reply	other threads:[~2003-04-06  2:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-05 21:26 Roger Sayle
2003-04-06  1:42 ` Zack Weinberg
2003-04-06  1:59   ` Roger Sayle
2003-04-06  3:33     ` David Edelsohn
2003-04-06  5:21       ` Roger Sayle [this message]
2003-04-06 16:49         ` Segher Boessenkool
2003-04-07 23:03           ` David Edelsohn
2003-04-06 15:14     ` David Edelsohn
     [not found] <200304080131.VAA30506@makai.watson.ibm.com>
2003-04-08 15:50 ` Roger Sayle

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=Pine.LNX.4.44.0304051833030.27022-100000@www.eyesopen.com \
    --to=roger@www.eyesopen.com \
    --cc=dje@watson.ibm.com \
    --cc=gcc@gcc.gnu.org \
    /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).