public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-114800-4-onp7LpYTcp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114800-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114800 Andrew Pinski <pinskia at gcc dot gnu.org> 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 <pinskia at gcc dot gnu.org> --- tr = {}; tr.f1 = 1; tr.f3 = 3; foo (&tr); We are able to do DSE for tr.f0 and tr.f2 but not the original tr = {}. Note there is some slightly difference IR from the front-ends (C does not produce the `= {};` part while C++ does) C++ front-end (before gimplification): <<cleanup_point struct thresh_restart tr = {.f1=1, .f2=2, .f3=3};>>; <<cleanup_point <<< Unknown tree: expr_stmt tr.f0 = b >>>>>; C front-end: struct thresh_restart tr = {.f0=b, .f1=1, .f2=2, .f3=3}; Note this is the DECL_EXPR here.
next prev parent reply other threads:[~2024-04-22 23:33 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-22 8:27 [Bug rtl-optimization/114800] New: " absoler at smail dot nju.edu.cn 2024-04-22 9:10 ` [Bug rtl-optimization/114800] " xry111 at gcc dot gnu.org 2024-04-22 23:33 ` pinskia at gcc dot gnu.org [this message] 2024-04-22 23:35 ` [Bug tree-optimization/114800] DSE does not remove set-zero which is partial redundant pinskia at gcc dot gnu.org 2024-04-22 23:40 ` [Bug tree-optimization/114800] DSE does not remove set-zero which is partial redundant with respect to mod-ref pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-114800-4-onp7LpYTcp@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).