From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCF483858CDA; Mon, 22 Apr 2024 23:33:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCF483858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713828783; bh=bpVS46lPJw+IuRS4TQuZ9HUHOeHYa2XYBhBHvEfrpO0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VLxzetSm4ab11w/U0q6xRuYmb9zjkdsRPWagAQFvezZPi56leOr/DwnlrF+wNAFlK iq2pSu2q2UGgYbwcMGlHbgX9i6m8+ZBN63VJpt7CNmjxb0cztavGj6gLusHMAnVNaG 2rUi9Rm/KvsnPUT9kBRMaOQX6NBdZtOcHzV+9nkA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114800] redundant set-zero when initiate a struct Date: Mon, 22 Apr 2024 23:33:03 +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: 13.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia 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: bug_severity bug_status cf_reconfirmed_on everconfirmed component 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=3D114800 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Status|UNCONFIRMED |NEW Last reconfirmed| |2024-04-22 Ever confirmed|0 |1 Component|rtl-optimization |tree-optimization --- Comment #2 from Andrew Pinski --- tr =3D {}; tr.f1 =3D 1; tr.f3 =3D 3; foo (&tr); We are able to do DSE for tr.f0 and tr.f2 but not the original tr =3D {}. Note there is some slightly difference IR from the front-ends (C does not produce the `=3D {};` part while C++ does) C++ front-end (before gimplification): <>; <>>>>; C front-end: struct thresh_restart tr =3D {.f0=3Db, .f1=3D1, .f2=3D2, .f3=3D3}; Note this is the DECL_EXPR here.=