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 tree-optimization/102880] [12 Regression] Dead Code Elimination Regression at -O3 Date: Tue, 16 Nov 2021 10:31:18 +0000 [thread overview] Message-ID: <bug-102880-4-r0IK4pyxUg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102880-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102880 --- Comment #7 from CVS 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:f98f373dd822b35c52356b753d528924e9f89678 commit r12-5300-gf98f373dd822b35c52356b753d528924e9f89678 Author: Richard Biener <rguenther@suse.de> Date: Mon Nov 15 15:19:36 2021 +0100 tree-optimization/102880 - make PHI-OPT recognize more CFGs This allows extra edges into the middle BB for the PHI-OPT transforms using replace_phi_edge_with_variable that do not end up moving stmts from that middle BB. This avoids regressing gcc.dg/tree-ssa/ssa-hoist-4.c with the actual fix for PR102880 where CFG cleanup has the choice to remove two forwarders and picks "the wrong" leading to if (a > b) / /\ / / <BB> / | # PHI <a, b> rather than if (a > b) | /\ | <BB> \ | / \ | # PHI <a, b, b> but it's relatively straight-forward to support extra edges into the middle-BB in paths ending in replace_phi_edge_with_variable and that do not require moving stmts. That's because we really only want to remove the edge from the condition to the middle BB. Of course actually doing that means updating dominators in non-trival ways which is why I kept the original code for the single edge case and simply defer to CFG cleanup by adjusting the condition for the complicated case. The testcase needs to be a GIMPLE one since it's quite unreliable to produce the desired CFG. 2021-11-15 Richard Biener <rguenther@suse.de> PR tree-optimization/102880 * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Push single_pred (bb1) condition to places that really need it. (match_simplify_replacement): Likewise. (value_replacement): Likewise. (replace_phi_edge_with_variable): Deal with extra edges into the middle BB. * gcc.dg/tree-ssa/phi-opt-26.c: New testcase.
next prev parent reply other threads:[~2021-11-16 10:31 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-21 13:27 [Bug tree-optimization/102880] New: " theodort at inf dot ethz.ch 2021-10-21 13:46 ` [Bug tree-optimization/102880] " marxin at gcc dot gnu.org 2021-10-22 6:56 ` pinskia at gcc dot gnu.org 2021-10-22 6:57 ` rguenth at gcc dot gnu.org 2021-10-22 8:44 ` rguenth at gcc dot gnu.org 2021-10-29 9:09 ` rguenth at gcc dot gnu.org 2021-11-11 12:42 ` rguenth at gcc dot gnu.org 2021-11-16 10:31 ` cvs-commit at gcc dot gnu.org [this message] 2021-11-16 10:32 ` cvs-commit at gcc dot gnu.org 2021-11-16 10:33 ` rguenth at gcc dot gnu.org 2021-11-17 8:41 ` clyon at gcc dot gnu.org 2021-11-17 8:47 ` pinskia at gcc dot gnu.org 2021-11-18 8:56 ` 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-102880-4-r0IK4pyxUg@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).