public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kip at thevertigo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/97329] POWER9 default cache and line sizes appear to be wrong
Date: Thu, 08 Oct 2020 23:53:52 +0000	[thread overview]
Message-ID: <bug-97329-4-wn212BDYRA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97329-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97329

--- Comment #7 from Kip Warner <kip at thevertigo dot com> ---
So it looks like even with GCC 11 in trunk it's still sometimes wrong on
power9.

Wrong L2 cache size when no -mcpu specified:

$ gcc -Q --help=param | grep -i cache
  --param=l1-cache-line-size=           128
  --param=l1-cache-size=                32
  --param=l2-cache-size=                256

Correct when manually specifying native (power9) cpu:

$ gcc -Q -mcpu=native --help=param | grep -i cache
  --param=l1-cache-line-size=           128
  --param=l1-cache-size=                32
  --param=l2-cache-size=                512

Correct when manually specifying power9 cpu:

$ gcc -Q -mcpu=power9 --help=param | grep -i cache
  --param=l1-cache-line-size=           128
  --param=l1-cache-size=                32
  --param=l2-cache-size=                512

Wrong L2 cache size when powerpc64le is selected in place of power9:

$ gcc -Q -mcpu=powerpc64le --help=param | grep -i cach
  --param=l1-cache-line-size=           128
  --param=l1-cache-size=                32
  --param=l2-cache-size=                256

Looks like this might be a clue. GCC did not identify the host/build/target as
power9 automatically:

$ gcc -dumpmachine
powerpc64le-unknown-linux-gnu

I built it from trunk last night on a power9 machine. I've attached my
config.log.

$ gcc --version
gcc (GCC) 11.0.0 20201008 (experimental)
(...)

  parent reply	other threads:[~2020-10-08 23:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08  3:35 [Bug c/97329] New: " kip at thevertigo dot com
2020-10-08  5:31 ` [Bug target/97329] " kip at thevertigo dot com
2020-10-08  5:39 ` kip at thevertigo dot com
2020-10-08 19:41 ` segher at gcc dot gnu.org
2020-10-08 20:10 ` kip at thevertigo dot com
2020-10-08 20:11 ` segher at gcc dot gnu.org
2020-10-08 23:53 ` kip at thevertigo dot com
2020-10-08 23:53 ` kip at thevertigo dot com [this message]
2020-10-09 12:55 ` segher at gcc dot gnu.org
2021-03-23  6:54 ` luoxhu at gcc dot gnu.org
2021-03-23 22:44 ` segher at gcc dot gnu.org
2021-03-25  1:05 ` luoxhu at gcc dot gnu.org
2021-03-25  4:53 ` cvs-commit at gcc dot gnu.org
2021-03-25  5:01 ` cvs-commit at gcc dot gnu.org

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=bug-97329-4-wn212BDYRA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).