public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111422] Wrong code at -O3 on x86_64-linux-gnu Date: Wed, 15 May 2024 16:13:29 +0000 [thread overview] Message-ID: <bug-111422-4-NBXzLSvrkr@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111422-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111422 --- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:ab25eef36400e8c1d28e3ed059c5f95a38b45f17 commit r15-517-gab25eef36400e8c1d28e3ed059c5f95a38b45f17 Author: Richard Biener <rguenther@suse.de> Date: Wed May 15 13:06:30 2024 +0200 middle-end/111422 - wrong stack var coalescing, handle PHIs The gcc.c-torture/execute/pr111422.c testcase after installing the sink pass improvement reveals that we also need to handle _65 = &g + _58; _44 = &g + _43; # _59 = PHI <_65, _44> *_59 = 8; g = {v} {CLOBBER(eos)}; ... n[0] = &f; *_59 = 8; g = {v} {CLOBBER(eos)}; where we fail to see the conflict between n and g after the first clobber of g. Before the sinking improvement there was a conflict recorded on a path where _65/_44 are unused, so the real conflict was missed but the fake one avoided the miscompile. The following handles PHI defs in add_scope_conflicts_2 which fixes the issue. PR middle-end/111422 * cfgexpand.cc (add_scope_conflicts_2): Handle PHIs by recursing to their arguments.
next prev parent reply other threads:[~2024-05-15 16:13 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-15 7:42 [Bug tree-optimization/111422] New: " shaohua.li at inf dot ethz.ch 2023-09-15 12:20 ` [Bug tree-optimization/111422] " rguenth at gcc dot gnu.org 2023-09-15 12:26 ` rguenth at gcc dot gnu.org 2023-09-15 12:35 ` rguenth at gcc dot gnu.org 2024-01-16 10:51 ` [Bug middle-end/111422] " cvs-commit at gcc dot gnu.org 2024-03-02 0:38 ` cvs-commit at gcc dot gnu.org 2024-05-15 16:13 ` cvs-commit at gcc dot gnu.org [this message] 2024-06-11 10:36 ` cvs-commit at gcc dot gnu.org 2024-06-20 13:22 ` cvs-commit at gcc dot gnu.org 2024-06-20 13:27 ` jakub 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-111422-4-NBXzLSvrkr@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).