From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 70B973943416; Thu, 8 Oct 2020 23:53:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70B973943416 From: "kip at thevertigo dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kip at thevertigo dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 23:53:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97329 --- Comment #7 from Kip Warner --- 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=3Dparam | grep -i cache --param=3Dl1-cache-line-size=3D 128 --param=3Dl1-cache-size=3D 32 --param=3Dl2-cache-size=3D 256 Correct when manually specifying native (power9) cpu: $ gcc -Q -mcpu=3Dnative --help=3Dparam | grep -i cache --param=3Dl1-cache-line-size=3D 128 --param=3Dl1-cache-size=3D 32 --param=3Dl2-cache-size=3D 512 Correct when manually specifying power9 cpu: $ gcc -Q -mcpu=3Dpower9 --help=3Dparam | grep -i cache --param=3Dl1-cache-line-size=3D 128 --param=3Dl1-cache-size=3D 32 --param=3Dl2-cache-size=3D 512 Wrong L2 cache size when powerpc64le is selected in place of power9: $ gcc -Q -mcpu=3Dpowerpc64le --help=3Dparam | grep -i cach --param=3Dl1-cache-line-size=3D 128 --param=3Dl1-cache-size=3D 32 --param=3Dl2-cache-size=3D 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) (...)=