From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6AE03853804; Mon, 30 May 2022 12:21:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6AE03853804 From: "ubizjak at gmail dot com" 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:21:22 +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: ubizjak at gmail dot com 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: 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:21:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105624 --- Comment #6 from Uro=C5=A1 Bizjak --- (In reply to rsandifo@gcc.gnu.org from comment #5) > 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. >=20 > The intent of the patch seemed good otherwise (and a nice clean-up). > I don't think the whole thing needed to be reverted. I was afraid I don't understood the reason of the failure well, although it happened very rarely (actually, no failures were detected during the build = or testsuite run). The patch obviously triggered some inconsistency in the infrastructure, so without some assurances, I took the safe way and reverted everything. I would gladly revert the revert. The reload is just doing unnecessary work when multiple constraints are the same; all necessary information could be retreived from the predicate.=