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/111003] [14 Regression] Dead Code Elimination Regression at -O3 since r14-2161-g237e83e2158 Date: Thu, 11 Jan 2024 07:52:57 +0000 [thread overview] Message-ID: <bug-111003-4-6BBExdEm3t@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111003-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111003 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Of course that's not really a "fix", but it's restoring of not doing the extra hoisting. So it does fix the regression but not maybe the underlying issue. We're not anticipating more imprecise range-info on DEFs when hoisting here. The "real" fix would be to improve conditional hoisting - we have <bb 12> [local count: 29170419070]: # prephitmp_61 = PHI <pretmp_60(11), prephitmp_59(10)> _13 = (unsigned int) _3; if (_3 > 6) goto <bb 73>; [50.00%] else goto <bb 13>; [50.00%] <bb 73> [local count: 14585209535]: goto <bb 14>; [100.00%] <bb 13> [local count: 14585209535]: iftmp.9_18 = _13 << 6; _63 = _13 ^ iftmp.9_18; _65 = _63 != 10; <bb 14> [local count: 35145083376]: # prephitmp_66 = PHI <1(73), _65(13), 1(74)> # prephitmp_67 = PHI <prephitmp_61(73), prephitmp_61(13), prephitmp_59(74)> and the diamond with if (_3 > 6) including the precceding def of _13 (which wasn't sunk) is invariant. There's an existing bug about LIM missing a way to hoist a sub-CFG (it can only hoist PHIs as COND_EXPRs). It might not exactly fit "LIM" but could be integrated with this pass. I'd say we close this bug, I'll add the testcase.
next prev parent reply other threads:[~2024-01-11 7:52 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-12 13:53 [Bug tree-optimization/111003] New: " scherrer.sv at gmail dot com 2023-08-12 17:39 ` [Bug tree-optimization/111003] " pinskia at gcc dot gnu.org 2023-08-12 17:45 ` pinskia at gcc dot gnu.org 2023-08-14 8:03 ` rguenth at gcc dot gnu.org 2023-11-24 4:33 ` pinskia at gcc dot gnu.org 2024-01-10 14:39 ` jamborm at gcc dot gnu.org 2024-01-11 7:52 ` rguenth at gcc dot gnu.org [this message] 2024-01-11 8:15 ` cvs-commit 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-111003-4-6BBExdEm3t@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).