From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD2D13858D35; Fri, 15 Sep 2023 12:35:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD2D13858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694781327; bh=jZVF/5eAoSznDSBjM5ot0W0chuXyeTcZasDc3g4NBBg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XcBsYWyoWjcRDMH1rVR/hrZfKmFPXCzU9gdt6XpZ9/oNchFLWQPPWYlYpLQXxsXLz oK4ixQMpRDWhmqPnllLZLhb/8XmJoQCKbEsaRpjq/Iny6XAMG5Q4PSFS4eZt3NuZJS 47h+gc9xGNCxN3k8XdcL91w7na2Nh2MP0QvPD7aM= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111422] Wrong code at -O3 on x86_64-linux-gnu Date: Fri, 15 Sep 2023 12:35:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization, needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: keywords 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=3D111422 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #3 from Richard Biener --- There's a missed optimization. We have # PT =3D { D.2843 } _44 =3D &g + _43; ... *_44 =3D 8; g =3D{v} {CLOBBER(eol)}; ... *_44 =3D 8; g =3D{v} {CLOBBER(eol)}; ... *_44 =3D 8; g =3D{v} {CLOBBER(eol)}; I guess the clobber doesn't kill the ref according to stmt_kills_ref_p, we'd have to special-case singleton points-to sets here. Optimizing the stores would avoid the bogus sharing of g and n.=