From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C1A49385E03D; Mon, 30 May 2022 12:31:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1A49385E03D 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:31:01 +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: 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:31:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105624 --- Comment #7 from rsandifo at gcc dot gnu.org --- (In reply to Uro=C5=A1 Bizjak from comment #6) > 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 rever= ted > everything. But like I say, I think it's due to the % in that particular instruction. When % is used on operand N, the constraints for operands N and N+1 have to be tight enough to support both the predicate on operand N and the predicate on operand N+1. So for: (define_insn_and_split "*anddi_1_btr" [(set (match_operand:DI 0 "nonimmediate_operand" "=3Drm") (and:DI (match_operand:DI 1 "nonimmediate_operand" "%0") (match_operand:DI 2 "const_int_operand"))) (clobber (reg:CC FLAGS_REG))] The constraints on operand 2 are effectively matching nonimmediate_operand|const_int_operand rather than just const_int_operand. I think it would work to keep the constraints for const_int_operands that are in a % pair and drop them elsewhere. (So a partial reapplication, rather than a full reapplication.)=