From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 671343858D39; Wed, 28 Dec 2022 21:24:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 671343858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672262697; bh=3gRHV23/WoCf1g1FB80TOq7PVEY3Gow/c8VFHqnHA78=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nDDW3F63djwSirmMpDRxrEOjgIMBOKcX2fNw8GnPu/sJVHauvzbRf/pFkK8Wq5U2e 0RJqIbYXwD4MtQxpHQFUrFpmklsTxLTiviIQn6jKEULTeD23yCkE/tX08CwFbjh7Qm dgd7ftzAdIx7yVafNfyZbq/DZZDV0Jfattgc6HMQ= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108208] Bad assembly? on large LLVM source files on powerpc-unknown-linux-gnu (Error: operand out of range) Date: Wed, 28 Dec 2022 21:24:56 +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: 13.0 X-Bugzilla-Keywords: assemble-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: resolution bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108208 Segher Boessenkool changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #2 from Segher Boessenkool --- Yes, agreed. Marking this bug as invalid. If you need a bigger code model you should use -mcmodel=3Dlarge, or keep co= de size under control some other way (using -O3 is a very bad idea in general; it means "don't do tradeoffs, be overly optimistic always". -O2 is perhaps a bit too conservative, but -O3 definitely is too far out on the other side of the spectrum. Luckily there are many smaller tweak flags, and many para= ms you can fiddle with). This is not a new problem at all. The default code model we use is quite conservative, but it is not very hard to overflow its limits. You usually get much better (smaller as well as faster) generated code by writing better source code, dividing it up into translation units a bit smarter.=