From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AED1738F860A; Mon, 30 May 2022 12:00:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AED1738F860A From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105624] [13 Regression] ICE in final_scan_insn_1, at final.cc:2861 (error: could not split insn) Date: Mon, 30 May 2022 12:00:37 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2022 12:00:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105624 rsandifo at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #5 from rsandifo at gcc dot gnu.org --- FWIW, I think the problem is specific to operands that are commutative with a non-constant operand. For example, suppose the pre-RA instruction had a pseudo register R matching a register_operand and a constant C matching a const_int_operand. If R does not get allocated, and so gets replaced by a stack slot M, the % would allow the RA to try mapping C to the register_operand and M to the const_int_operand. Without a constraint on the latter, the M mapping would seem to be valid, and reloading C into a register might seem less costly than reloading M into a register. The intent of the patch seemed good otherwise (and a nice clean-up). I don't think the whole thing needed to be reverted.=