From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D0E839AB920; Fri, 7 Jun 2024 04:45:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D0E839AB920 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717735503; bh=7/vRR/sFsS649gBJX+WXtcMluIqd4W/5P2qG7P7PXjI=; h=From:To:Subject:Date:From; b=nv+SasRIOc7yc6XFuOpo+r5BdA0PwpwXUf0QctGlkE4vR06x+4zxb2fqlv3fR3fSB Z5LBmH5xWpQo0366REHAOItBNNPbmSBeJbdxdM0elTyn1G/q+HoUJDVkCxcDKUbtjk OLSUFuEZbATnio/y5NJi/HiKlMD64d8L3rTOIhX4= From: "user202729 at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115381] New: Missed deoptimization opportunity when comparing two different linker symbols Date: Fri, 07 Jun 2024 04:45:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: user202729 at protonmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D115381 Bug ID: 115381 Summary: Missed deoptimization opportunity when comparing two different linker symbols Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: user202729 at protonmail dot com Target Milestone: --- Code: ``` int x(); int y(); int z(){ return &x =3D=3D &y; } ``` Clang optimizes this to 0. GCC doesn't. Godbolt link: https://godbolt.org/z/8rGbbdrbe=