From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B154839484A5; Tue, 4 May 2021 21:51:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B154839484A5 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100418] [12 Regression][gcn] since r12-397 bootstrap fails: error: unrecognizable insn: in extract_insn, at recog.c:2770 Date: Tue, 04 May 2021 21:51:33 +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: 12.0 X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: 12.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: Tue, 04 May 2021 21:51:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100418 --- Comment #2 from Tobias Burnus --- (gdb) p debug(x1) (set (reg:DI 444) (plus:DI (reg:DI 444) (const_int -32 [0xffffffffffffffe0]))) Looking at the generated code, I see: switch (GET_CODE (x4)) =E2=86=92 (reg:DI 444) case REG: operands[1] =3D x4; =E2=86=92 (reg:DI 444) x6 =3D XEXP (x3, 1); =E2=86=92 (const_int -32 [0xffffffffffffffe0]) operands[2] =3D x6; switch (GET_CODE (operands[1])) case REG: switch (GET_MODE (operands[0])) =E2=86=92 E_DImode case E_DImode: if (pnum_clobbers !=3D NULL && register_operand (operands[0], E_DImode) && GET_MODE (x3) =3D=3D E_DImode && register_operand (operands[1], E_DImode) && nonmemory_operand (operands[2], E_DImode)) { *pnum_clobbers =3D 2; return 29; /* adddi3 */ } break; Thus, we have three times the E_DImode =E2=80=93 but 'pnum_clobbers' =3D=3D= NULL as it is called via: recog.c: 2768 icode =3D recog_memoized (insn); =E2=86=92 rtl.h: 273 INSN_CODE (insn) =3D recog (PATTERN (insn), insn, 0); =E2=86=92 insn-recog.c recog (rtx x1 ATTRIBUTE_UNUSED, rtx_insn *insn ATTRIBUTE_UNUSED, int *pnum_clobbers ATTRIBUTE_UNUSED) There 0 (for a nullptr) is passed =E2=86=92 pnum_clobbers =3D=3D NULL. In gcn.md, the code for 'adddi3' is: ; Having this as an insn_and_split allows us to keep together DImode adds ; through some RTL optimisation passes, and means the CC reg we set isn't ; dependent on the constraint alternative (which doesn't seem to work well). ; If v_addc_u32 is used to add with carry, a 32-bit literal constant cannot= be ; used as an operand due to the read of VCC, so we restrict constants to the ; inlinable range for that alternative. (define_insn_and_split "adddi3" [(set (match_operand:DI 0 "register_operand" "=3DSg, v") (plus:DI (match_operand:DI 1 "register_operand" " Sg, v") (match_operand:DI 2 "nonmemory_operand" "SgB,vA"))) (clobber (match_scratch:BI 3 "=3Dcs, X")) (clobber (match_scratch:DI 4 "=3D X,cV"))] I am not 100% sure, I understand where the 'pnum_clobbers !=3D NULL' comes = from, but I think from: acceptance_ptr->u.full.u.num_clobbers =3D XVECLEN (pattern, 0) - i; in genrecog.c's remove_clobbers. In any case, the define_insn_and_split does have two clobber ...=