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/94618] [8/9/10 Regression] '-fcompare-debug' failure (length) with -O2 -fnon-call-exceptions since r8-565-g7581ce9a1ad6df9c
Date: Fri, 17 Apr 2020 08:34:13 +0000	[thread overview]
Message-ID: <bug-94618-4-IumXdiyODB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94618-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94618

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:c41884a09206be0e21cad7eea71b9754daa969d4

commit r10-7769-gc41884a09206be0e21cad7eea71b9754daa969d4
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Apr 17 10:33:27 2020 +0200

    Fix -fcompare-debug issue in delete_insn_and_edges [PR94618]

    delete_insn_and_edges calls purge_dead_edges whenever deleting the last
insn
    in a bb, whatever it is.  If it called it only for mandatory last insns
    in the basic block (that may not be followed by DEBUG_INSNs, dunno if that
    is control_flow_insn_p or something more complex), that wouldn't be a
    problem, but as it calls it on any last insn and can actually do something
    in the bb, if such an insn is followed by one more more DEBUG_INSNs and
    nothing else in the same bb, we don't call purge_dead_edges with -g and do
    call it with -g0.

    On the testcase, there are two reg-to-reg moves with REG_EH_REGION notes
    (previously memory accesses but simplified and yet not optimized), and the
    second is followed by DEBUG_INSNs; the second move is delete_insn_and_edges
    and after removing it, for -g0 purge_dead_edges removes the REG_EH_REGION
    from the now last insn in the bb (the first reg-to-reg move), while
    for -g it isn't called and things diverge from that quickly on.

    Fixed by calling purdge_dead_edges even if we remove the last real insn
    followed only by DEBUG_INSNs in the same bb.

    2020-04-17  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/94618
            * cfgrtl.c (delete_insn_and_edges): Set purge not just when
            insn is the BB_END of its block, but also when it is only followed
            by DEBUG_INSNs in its block.

            * g++.dg/opt/pr94618.C: New test.

  parent reply	other threads:[~2020-04-17  8:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 13:04 [Bug debug/94618] New: [10 Regression] '-fcompare-debug' failure (length) with -O2 -fnon-call-exceptions zsojka at seznam dot cz
2020-04-16 14:00 ` [Bug debug/94618] [8/9/10 Regression] '-fcompare-debug' failure (length) with -O2 -fnon-call-exceptions since r8-565-g7581ce9a1ad6df9c marxin at gcc dot gnu.org
2020-04-16 14:18 ` jakub at gcc dot gnu.org
2020-04-16 14:26 ` [Bug rtl-optimization/94618] " rguenth at gcc dot gnu.org
2020-04-16 14:44 ` jakub at gcc dot gnu.org
2020-04-16 15:37 ` jakub at gcc dot gnu.org
2020-04-17  7:35 ` rguenth at gcc dot gnu.org
2020-04-17  7:51 ` jakub at gcc dot gnu.org
2020-04-17  7:54 ` jakub at gcc dot gnu.org
2020-04-17  8:34 ` cvs-commit at gcc dot gnu.org [this message]
2020-04-17  8:35 ` [Bug rtl-optimization/94618] [8/9 " jakub at gcc dot gnu.org
2020-09-16 19:20 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:34 ` jakub at gcc dot gnu.org
2022-05-27 13:15 ` 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-94618-4-IumXdiyODB@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: link
Be 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).