From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9ADEF3858D28; Tue, 20 Jun 2023 21:45:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9ADEF3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687297526; bh=i83KLdjOuqR6LMN02uRwEkkJNbyjuk1HYP2qLATeOjQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PLEmrR7CSkYOP0EHg//KtGOggzS+DL0Vlp8C0l+3/Es5sRX9yDHLj5Tby7718dJcH vNGrJM0APhOQCToOsiRYttCHMmEvm4WTwLUYNTY8LgcxTVB3yXVf5OQBQgLWQUnKct 2lJR+kqJwPVPJ2ljSiXsXEphSjJhe7Z0vmuqP0cE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110307] ICE in move_insn, at haifa-sched.cc:5473 when building Ruby on alpha with -fPIC -O2 (or -fpeephole2 -fschedule-insns2) Date: Tue, 20 Jun 2023 21:45:26 +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: 13.1.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D110307 --- Comment #7 from Andrew Pinski --- (In reply to Alexander Monakov from comment #6)=20 > Note the REG_EH_REGION. This is relevant because can_nonlocal_goto checks > it, so for insn 25 we knew it wouldn't return to the setjmp receiver. > Applying the peephole dropped the note. This should fix it but there might be other REG notes that need to be copied still: apinski@xeond:~/src/upstream-gcc/gcc/gcc$ git diff recog.cc diff --git a/gcc/recog.cc b/gcc/recog.cc index 37432087812..4bad4a59057 100644 --- a/gcc/recog.cc +++ b/gcc/recog.cc @@ -3921,6 +3921,7 @@ peep2_attempt (basic_block bb, rtx_insn *insn, int match_len, rtx_insn *attempt) { case REG_NORETURN: case REG_SETJMP: + case REG_EH_REGION: case REG_TM: case REG_CALL_NOCF_CHECK: add_reg_note (new_insn, REG_NOTE_KIND (note),=