From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4CFB3858402; Thu, 18 Nov 2021 05:48:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4CFB3858402 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103275] [11/12 Regression] don't generate kmov with IE model relocations Date: Thu, 18 Nov 2021 05:48:09 +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.2.0 X-Bugzilla-Keywords: link-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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: 11.3 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, 18 Nov 2021 05:48:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103275 --- Comment #14 from Hongtao.liu --- (In reply to H.J. Lu from comment #11) > (In reply to Hongtao.liu from comment #10) > > I'm working on a patch which adds a new memory constraint "Bk" which wi= ll > > exclude TLS UNSPECs for mask register alternative. > >=20 > > The UNSPEC i'm excluding is like below, any other UNSPEC needs to be ad= ded? > >=20 > > bool > > ix86_notls_memory (rtx mem) > > { > > gcc_assert (MEM_P (mem)); > >=20 > > rtx addr =3D XEXP (mem, 0); > > subrtx_var_iterator::array_type array; > > FOR_EACH_SUBRTX_VAR (iter, array, addr, ALL) > > { > > rtx op =3D *iter; > > if (GET_CODE (op) =3D=3D UNSPEC) > > switch (XINT (op, 1)) > > { > > case UNSPEC_GOTTPOFF: > > case UNSPEC_GOTNTPOFF: > > case UNSPEC_TP: > > case UNSPEC_TLS_GD: > > case UNSPEC_TLS_LD_BASE: > > case UNSPEC_TLSDESC: > > case UNSPEC_TLS_IE_SUN: >=20 > This doesn't look right. For TARGET_64BIT, only >=20 > kmovq foo@gottpoff(%rip), %k0 > kmovq foo@tlsld(%rip), %k0 It looks like gcc won't generate kmovq foo@tlsld(%rip), %k0, but only leaq ("lea{q}\t{%&@tlsld(%%rip), %%rdi|rdi, %&@tlsld[rip]}", operands);=