From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 577213858427; Fri, 8 Mar 2024 13:02:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 577213858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709902974; bh=QDqM/4qEDXHncwhi+Tk49SzXkv1DVOflCtC5893zpnk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p6MA+TJZiMZiLioOVieR9NRcDYHaOx+rYf0ANV3QlSEe2WZTU9jZBIHf8VgTiVyQB XMtVLRjkLQ4WZxIqz7P0JV57zgkOavIDOJNz4zKHcPlvWDsPPzcDqu/vUeayd5HuXn nclpwQOh5DcSaxerrGKCN1QxTxMB5t5S0YlA9iy0= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/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 13:02:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: EH, ice-on-valid-code, wrong-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: 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 --- Comment #12 from Richard Biener --- (In reply to Uro=C5=A1 Bizjak from comment #11) > (In reply to Richard Biener from comment #10) > > The easiest fix would be to refuse applying STV to a insn that > > can_throw_internal () (that's an insn that has associated EH info). Up= dating > > in this case would require splitting the BB or at least moving the now > > no longer throwing insn to the next block (along the fallthru edge). >=20 > This would be simply: >=20 > --cut here-- > diff --git a/gcc/config/i386/i386-features.cc > b/gcc/config/i386/i386-features.cc > index 1de2a07ed75..90acb33db49 100644 > --- a/gcc/config/i386/i386-features.cc > +++ b/gcc/config/i386/i386-features.cc > @@ -437,6 +437,10 @@ scalar_chain::add_insn (bitmap candidates, unsigned = int > insn_uid, > && !HARD_REGISTER_P (SET_DEST (def_set))) > bitmap_set_bit (defs, REGNO (SET_DEST (def_set))); >=20=20 > + if (cfun->can_throw_non_call_exceptions that part shouldn't be necessary, can_throw_internal is cheap enough (but yes, unless STV handles calls it's correct) > + && can_throw_internal (insn)) > + return false; > + > /* ??? The following is quadratic since analyze_register_chain > iterates over all refs to look for dual-mode regs. Instead this > should be done separately for all regs mentioned in the chain once.= */ > --cut here-- >=20 > But I think, we could do better. Adding CC. We sure could, but I doubt it's too important? Maybe for Go/Ada.=