public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108351] [13 Regression] Dead Code Elimination Regression at -O3 since r13-4240-gfeeb0d68f1c708 Date: Fri, 17 Feb 2023 12:52:34 +0000 [thread overview] Message-ID: <bug-108351-4-y1U88qdlsX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108351-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108351 --- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> --- If you rename main to something else, like bar, and so the calls to f outside of the loop are not considered cold, you get the GCC 12 behavior. Is this reduced from a real-world problem? Because on the testcase IPA-CP actually does what I would like it to do, it iginores the first parameter because really IPA-SRA is better placed to deal with it and then does not duplicate f for the cold calls. The fact that the GCC 12 heuristics first cloned for a constant in a useless parameter in the loop and then, when removing it in the other calls, it happened to find out that those two share the same constant in the second parameter, which happened to make the function shorter, is basically luck rather than design.
next prev parent reply other threads:[~2023-02-17 12:52 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-10 11:46 [Bug tree-optimization/108351] New: Dead Code Elimination Regression at -O3 (trunk vs. 12.2.0) yann at ywg dot ch 2023-01-10 12:10 ` [Bug tree-optimization/108351] [13 Regression] " rguenth at gcc dot gnu.org 2023-01-10 14:41 ` [Bug tree-optimization/108351] [13 Regression] Dead Code Elimination Regression at -O3 since r13-4240-gfeeb0d68f1c708 marxin at gcc dot gnu.org 2023-01-10 22:48 ` pinskia at gcc dot gnu.org 2023-02-15 9:09 ` yinyuefengyi at gmail dot com 2023-02-15 9:15 ` yinyuefengyi at gmail dot com 2023-02-17 12:52 ` jamborm at gcc dot gnu.org [this message] 2023-04-08 14:38 ` law at gcc dot gnu.org 2023-04-26 6:57 ` [Bug tree-optimization/108351] [13/14 " rguenth at gcc dot gnu.org 2023-07-27 9:25 ` rguenth at gcc dot gnu.org 2023-11-24 12:43 ` sjames at gcc dot gnu.org 2023-11-24 14:56 ` yann at ywg dot ch 2023-11-24 15:47 ` jamborm 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-108351-4-y1U88qdlsX@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).