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 rtl-optimization/103837] [9/10 Regression] '-fcompare-debug' failure (length) w/ -Og -fmove-loop-invariants -fnon-call-exceptions -fno-tree-dce Date: Tue, 10 May 2022 08:22:19 +0000 [thread overview] Message-ID: <bug-103837-4-Nb9l48Q97X@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103837-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103837 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:aa998156c69fcb70ed637f34fd86e47020254ce5 commit r10-10661-gaa998156c69fcb70ed637f34fd86e47020254ce5 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Dec 28 17:40:17 2021 +0100 loop-invariant: Fix -fcompare-debug failure [PR103837] In the following testcase we have a -fcompare-debug failure, because can_move_invariant_reg doesn't ignore DEBUG_INSNs in its decisions. In the testcase we have due to uninitialized variable: loop_header debug_insn using pseudo84 pseudo84 = invariant insn using pseudo84 end loop and with -g decide not to move the pseudo84 = invariant before the loop header; in this case not resetting the debug insns might be fine. But, we could have also: pseudo84 = whatever loop_header debug_insn using pseudo84 pseudo84 = invariant insn using pseudo84 end loop and in that case not resetting the debug insns would result in wrong-debug. And, we don't really have generally a good substitution on what pseudo84 contains, it could inherit various values from different paths. So, the following patch ignores DEBUG_INSNs in the decisions, and if there are any that previously prevented the optimization, resets them before return true. 2021-12-28 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/103837 * loop-invariant.c (can_move_invariant_reg): Ignore DEBUG_INSNs in the decisions whether to return false or continue and right before returning true reset those debug insns that previously caused returning false. * gcc.dg/pr103837.c: New test. (cherry picked from commit 3c5fd3616f73fbcd241cc3a5e09275c2b0c49bd4)
next prev parent reply other threads:[~2022-05-10 8:22 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-26 16:45 [Bug debug/103837] New: [12 " asolokha at gmx dot com 2021-12-26 21:10 ` [Bug debug/103837] " pinskia at gcc dot gnu.org 2021-12-27 11:28 ` [Bug tree-optimization/103837] [9/10/11/12 " jakub at gcc dot gnu.org 2021-12-27 11:35 ` pinskia at gcc dot gnu.org 2021-12-27 11:40 ` jakub at gcc dot gnu.org 2021-12-27 12:19 ` jakub at gcc dot gnu.org 2021-12-27 12:50 ` [Bug rtl-optimization/103837] " jakub at gcc dot gnu.org 2021-12-28 16:40 ` cvs-commit at gcc dot gnu.org 2021-12-28 16:43 ` [Bug rtl-optimization/103837] [9/10/11 " jakub at gcc dot gnu.org 2022-01-04 13:37 ` rguenth at gcc dot gnu.org 2022-01-24 9:20 ` cvs-commit at gcc dot gnu.org 2022-01-24 9:30 ` [Bug rtl-optimization/103837] [9/10 " jakub at gcc dot gnu.org 2022-05-10 8:22 ` cvs-commit at gcc dot gnu.org [this message] 2022-05-11 6:23 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:36 ` 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-103837-4-Nb9l48Q97X@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).