public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/106751] [10/11/12/13 Regression] internal compiler error: in purge_dead_edges with inline-asm goto
Date: Thu, 15 Dec 2022 15:51:12 +0000	[thread overview]
Message-ID: <bug-106751-4-CeBQn7C18G@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106751-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'm afraid I don't know much about the RTL lim, but
1840          reorder_insns (inv->insn, inv->insn, BB_END (preheader));
with no check whether it is actually ok to append the statement at the end of
the preheader bb (at least no check that I can find) sounds wrong to me and I'm
just confused why it doesn't break stuff much more often.
From what I can see, loop-invariant.cc pass happens in between loop2_init and
loop2_done passes where the former calls loop_optimizer_init (LOOPS_NORMAL |
LOOPS_HAVE_RECORDED_EXITS);
which should ensure that loops have preheaders, but doesn't actually ask for
LOOPS_HAVE_FALLTHRU_PREHEADERS.
If the latter was on, then create_preheader would force splitting of the edge:
          /* If we want fallthru preheaders, also create forwarder block when
             preheader ends with a jump or has predecessors from loop.  */
          else if ((flags & CP_FALLTHRU_PREHEADERS)
                   && (JUMP_P (BB_END (single_entry->src))
                       || has_preds_from_loop (single_entry->src, loop)))
            need_forwarder_block = true;
So, should loop-invariant.cc split_edge the preheader edge if preheader block
ends with JUMP_P, or shall we somehow arrange for
LOOPS_HAVE_FALLTHRU_PREHEADERS?

  parent reply	other threads:[~2022-12-15 15:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 10:09 [Bug c/106751] New: internal compiler error: in purge_dead_edges, at cfgrtl.cc:3347 christophe.leroy at csgroup dot eu
2022-08-26 10:10 ` [Bug c/106751] " christophe.leroy at csgroup dot eu
2022-08-26 12:20 ` [Bug target/106751] " christophe.leroy at csgroup dot eu
2022-08-26 12:38 ` marxin at gcc dot gnu.org
2022-08-26 18:07 ` [Bug middle-end/106751] internal compiler error: in purge_dead_edges with inline-asm goto pinskia at gcc dot gnu.org
2022-08-26 18:08 ` pinskia at gcc dot gnu.org
2022-08-26 18:14 ` [Bug rtl-optimization/106751] " pinskia at gcc dot gnu.org
2022-08-26 18:21 ` pinskia at gcc dot gnu.org
2022-09-13 15:50 ` segher at gcc dot gnu.org
2022-12-15 13:10 ` [Bug rtl-optimization/106751] [10/11/12/13 Regression] " jakub at gcc dot gnu.org
2022-12-15 15:51 ` jakub at gcc dot gnu.org [this message]
2022-12-15 16:53 ` jakub at gcc dot gnu.org
2022-12-15 18:05 ` rguenth at gcc dot gnu.org
2022-12-16  9:20 ` cvs-commit at gcc dot gnu.org
2022-12-16  9:23 ` [Bug rtl-optimization/106751] [10/11/12 " jakub at gcc dot gnu.org
2023-02-10 17:44 ` cvs-commit at gcc dot gnu.org
2023-02-10 17:56 ` [Bug rtl-optimization/106751] [10/11 " jakub at gcc dot gnu.org
2023-05-02 20:12 ` cvs-commit at gcc dot gnu.org
2023-05-03  9:26 ` [Bug rtl-optimization/106751] [10 " jakub at gcc dot gnu.org
2023-05-03 15:20 ` cvs-commit at gcc dot gnu.org
2023-05-04  7:19 ` 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-106751-4-CeBQn7C18G@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).