public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101641] Bogus redundant store removal Date: Thu, 29 Jul 2021 09:07:26 +0000 [thread overview] Message-ID: <bug-101641-4-e3z9uJbDqt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101641-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101641 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Just some more brain-dumps from thinking about a fix. - we can annotate the alias_set_entry with a flag whether it was created for a union type and use that to improve the logic - we can introduce some dynamic-type change IL elements that would allow us to elide all those redundant stores but preserve their effect. They'd be modeled as stores but would generate no code. The stored value would be implicit so we can readily remove the load (or constant). An internal function call like we have for masked stores would be a possibility but those would be quite disruptive to passes compared to the load/store sequence, so preserving the original store but with a special RHS seems most logical (but we cannot use RHS == LHS as that's only valid GIMPLE for non-register-types). We'd also have to be careful to not treat those "stores" as kills which leans towards the IFN again. A fix along the first idea looks least intrusive for backporting. A fix along the second idea looks best for recovering lost redundant store removal.
next prev parent reply other threads:[~2021-07-29 9:07 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-27 12:03 [Bug tree-optimization/101641] New: " rguenth at gcc dot gnu.org 2021-07-27 12:08 ` [Bug tree-optimization/101641] " rguenth at gcc dot gnu.org 2021-07-29 8:09 ` rguenth at gcc dot gnu.org 2021-07-29 8:55 ` rguenth at gcc dot gnu.org 2021-07-29 9:07 ` rguenth at gcc dot gnu.org [this message] 2021-07-29 18:04 ` muecker at gwdg dot de 2021-09-10 8:05 ` rguenth at gcc dot gnu.org 2021-09-28 10:20 ` rguenth 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-101641-4-e3z9uJbDqt@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).