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 rtl-optimization/111822] [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions since r12-5301-g045206450386bc
Date: Fri, 08 Mar 2024 07:50:15 +0000	[thread overview]
Message-ID: <bug-111822-4-NwvnqHIDPk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111822-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, -march=x86-64 was it.  The ICE means that the entry block wasn't reachable
from EXIT_BLOCK which means there are unreachable blocks.

This usually means some pass lacks CFG cleanup or delete_unreachable_blocks ().

A simple fix is the following, but the proper thing to do is track down who
leaves unreachable blocks around in the IL.

diff --git a/gcc/sched-rgn.cc b/gcc/sched-rgn.cc
index eb75d1bdb26..ff455ddd12e 100644
--- a/gcc/sched-rgn.cc
+++ b/gcc/sched-rgn.cc
@@ -65,6 +65,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "dbgcnt.h"
 #include "pretty-print.h"
 #include "print-rtl.h"
+#include "cfgcleanup.h"

 /* Disable warnings about quoting issues in the pp_xxx calls below
    that (intentionally) don't follow GCC diagnostic conventions.  */
@@ -3707,6 +3708,7 @@ rest_of_handle_live_range_shrinkage (void)
 #ifdef INSN_SCHEDULING
   int saved;

+  delete_unreachable_blocks ();
   initialize_live_range_shrinkage ();
   saved = flag_schedule_interblock;
   flag_schedule_interblock = false;

  parent reply	other threads:[~2024-03-08  7:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-15  6:14 [Bug rtl-optimization/111822] New: [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions zsojka at seznam dot cz
2023-10-16  7:22 ` [Bug rtl-optimization/111822] " rguenth at gcc dot gnu.org
2023-10-22 23:50 ` pinskia at gcc dot gnu.org
2023-10-23 20:48 ` sjames at gcc dot gnu.org
2023-10-23 22:36 ` [Bug rtl-optimization/111822] [12/13/14 Regression] during RTL pass: lr_shrinkage ICE: in operator[], at vec.h:910 with -O2 -m32 -flive-range-shrinkage -fno-dce -fnon-call-exceptions since r12-5301-g045206450386bc sjames at gcc dot gnu.org
2024-03-07 21:04 ` law at gcc dot gnu.org
2024-03-08  7:01 ` rguenth at gcc dot gnu.org
2024-03-08  7:13 ` zsojka at seznam dot cz
2024-03-08  7:50 ` rguenth at gcc dot gnu.org [this message]
2024-03-08  7:50 ` rguenth at gcc dot gnu.org
2024-03-08  8:13 ` [Bug target/111822] " rguenth at gcc dot gnu.org
2024-03-08  9:58 ` ubizjak at gmail dot com
2024-03-08 10:20 ` rguenth at gcc dot gnu.org
2024-03-08 12:59 ` ubizjak at gmail dot com
2024-03-08 13:02 ` rguenth at gcc dot gnu.org
2024-03-08 13:22 ` ubizjak at gmail dot com
2024-03-08 13:28 ` rguenth at gcc dot gnu.org
2024-03-10 10:33 ` ebotcazou at gcc dot gnu.org
2024-03-11  1:27 ` liuhongt at gcc dot gnu.org
2024-03-14  8:09 ` liuhongt at gcc dot gnu.org
2024-03-18 16:27 ` ubizjak at gmail dot com
2024-03-18 19:41 ` cvs-commit at gcc dot gnu.org
2024-03-19 15:57 ` cvs-commit at gcc dot gnu.org
2024-03-19 16:00 ` cvs-commit at gcc dot gnu.org
2024-03-19 16:01 ` ubizjak at gmail dot com

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-111822-4-NwvnqHIDPk@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).