From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD3833858415; Fri, 8 Mar 2024 07:50:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD3833858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709884216; bh=msHkfZIkRQpJ50uLpZ3QijQK40msfUQVnmtGLCwVMaI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Voco+EUv1XCjqSaSTbbMlhRJU5oXViqjuuHIWqyy0UamWdWe0ZNZPqCgue376arpp +K0PMORdPz1KwS8UxnVZ7FkSlEVv3Tr41KslMODFloU1K112I6VDfUQ4LV/Yxvq7cq u3lQvHL8IDmYbGzNTU7FdRpySfEIRUIMY0r9jwfs= From: "rguenth at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: EH, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111822 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #6 from Richard Biener --- Ah, -march=3Dx86-64 was it. The ICE means that the entry block wasn't reac= hable 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 =3D flag_schedule_interblock; flag_schedule_interblock =3D false;=