From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 88C353858C53; Fri, 2 Jun 2023 03:54:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88C353858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685678074; bh=FdF28q+FlhQXjzqtoWKp0tXSDP1wtd6A5o+CgqaYjlI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QhW6X5iKLEWmxUsIIQENHZB399FCOddXv52Us8b13OHZEvfNQ42Xy7aYb3Qe9XdyQ kGTqJxHtbGw1NQ8VXXrRxxv2Jkofh8G0SDgFXm3jozuXZLi+zz2ta2wWnxQy2rnAqR WpcZJAVKiNuewVk4nEq/SsngizC/Vu5RmN/Z/HTs= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/102733] missing fs:0 store when followed by one to gs:0 Date: Fri, 02 Jun 2023 03:54:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D102733 --- Comment #6 from Andrew Pinski --- Created attachment 55238 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55238&action=3Dedit Patch which I will be testing This adds a check for the address space in DSE. Even tested: ``` void test_null_store_fs_gs (void) { int __seg_fs *fs =3D (int __seg_fs *)0; *fs =3D 1;=20 int __seg_gs *gs =3D (int __seg_gs *)0; *gs =3D 2;=20=20 *fs =3D 3;=20 } ``` And only 2/3 are emitted (in that order) which is the correct DSE even.=