From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39D863857839; Tue, 8 Feb 2022 18:27:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39D863857839 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100354] [9/10/11/12 regression] aarch64: non-deligitimized UNSPEC UNSPEC_TLS (76) found in variable location Date: Tue, 08 Feb 2022 18:27:57 +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: 9.3.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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: Tue, 08 Feb 2022 18:27:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100354 --- Comment #6 from Jakub Jelinek --- In this particular case it is: (note 38 19 20 (var_location p (unspec:DI [ (const_int 0 [0]) ] UNSPEC_TLS)) NOTE_INSN_VAR_LOCATION) where p's value should be equal to that __builtin_thread_pointer () aka the base of the TLS region. I wonder if it could be represented as DW_OP_lit0 DW_OP_form_tls_address, one would need to test that in debugger. And if it works, figure out some target independent way or perhaps a target hook that would propagate this case from the target dependent UNSPEC_TLS to dwarf2out.cc that it could emit such location.=