From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6041D3892008; Wed, 21 Apr 2021 14:42:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6041D3892008 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100181] hot-cold partitioned code doesn't assemble Date: Wed, 21 Apr 2021 14:42:27 +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: burnus at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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: Wed, 21 Apr 2021 14:42:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100181 --- Comment #9 from Tobias Burnus --- (In reply to Thomas Schwinge from comment #8) > (In reply to Tobias Burnus from comment #7) > > (I could not reproduce the LLVM 9 issue in PR94278 back then.) >=20 > Hmm, but didn't you say in the LLVM issue > that you _did_ reproduce = this back then? I partially mixed it up - I could not reproduce it with a self-build LLVM b= ut could do so with the distro LLVM ones. Our/my LLVM bug 45887 is similar to https://bugs.llvm.org/show_bug.cgi?id=3D41914, which was fixed by https://reviews.llvm.org/D79943 and the latter adds the check which causes = the error message: "undefined label '.L33'" However, the other bug (41914) and the the testcase in the fix (D79943) were about a label which was truly missing as opposed to one which is just in a differently named .section. * * * Obviously, with D79943 at place (LLVM 11, 12, ...), I can reproduce the iss= ue with -O2 (with < -O0 there is only .text) as then 's_branch .L33' is in .section .text but '.L33:' is in '.section .text.unlikely'. Whether it is intended that cross-.section s_branch are no longer permitted= or whether it happened by chance by this patch or on purpose, I don't know. Sections themselves are supported =E2=80=93 and the LVM testsuite for GCN = has testcases with '.section' (under llvm/test/MC/AMDGPU/*.s) =E2=80=93 but in = the testsuite one at a time. GCC guards the .text.unlikely generation by (=E2=86=92 varasm.c's default_function_section) by if (!flag_reorder_functions || !targetm_common.have_named_sections) return NULL; while the patch in PR 94278 comment 3 uses flag_reorder_blocks_and_partition =3D 0=