From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A12AA385780C; Thu, 6 May 2021 08:08:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A12AA385780C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 Date: Thu, 06 May 2021 08:08:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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, 06 May 2021 08:08:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100373 --- Comment #13 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:b5254d6b75fe6be669396cd1261f1cba829cc451 commit r12-558-gb5254d6b75fe6be669396cd1261f1cba829cc451 Author: Richard Biener Date: Wed May 5 10:15:27 2021 +0200 ipa/100373 - fix emutls lowering compare-debug issue emutls figured that tls uses in debug-insns need lowering but that obviously has effects on code-generation as can be seen in the following IL diff with the new testcase: [local count: 1073741824]: - a =3D 0; + # DEBUG BEGIN_STMT _4 =3D __builtin___emutls_get_address (&__emutls_v.b); + # DEBUG D#1 =3D> *_4 + # DEBUG d =3D> (long int) D#1 + # DEBUG BEGIN_STMT + a =3D 0; + # DEBUG BEGIN_STMT *_4 =3D 0; return; where it figured the debug use of b in the original [local count: 1073741824]: # DEBUG BEGIN_STMT # DEBUG D#1 =3D> b # DEBUG d =3D> (long int) D#1 # DEBUG BEGIN_STMT a =3D 0; needs lowering (it maybe does when we want to produce perfect debug but that's just bad luck). The following patch fixes this by avoiding to create a new emutls address when visiting debug stmts and instead resets them. Another option might be to simply not lower debug stmt uses but I have no way to verify actual debug info for this. 2021-05-05 Richard Biener PR ipa/100373 * tree-emutls.c (gen_emutls_addr): Pass in whether we're dealing with a debug use and only query existing addresses if so. (lower_emutls_1): Avoid splitting out addresses for debug stmts, reset the debug stmt when we fail to find existing lowered addresses. (lower_emutls_phi_arg): Set wi.stmt. * gcc.dg/pr100373.c: New testcase.=