From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7EF1B3858C53; Fri, 1 Mar 2024 11:57:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EF1B3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709294264; bh=GogdmJOVB9VTHxfL2vKyvigGc1fQ6qXVaq9kgazAkbE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZjrFGlfTlI4Pt8+jF6YF0VuMeZocvjk2jbrYC9Uv+DBnaPe65WxKlJgXQ/g2ytxUp j2yiY9WQiurdArBzR0uT4Zh6HTDB4sDL4JGFQ6AHoxrSV2t1uMcr6t9NUXi58MKxcj MLPw+yE/6PEYGAetQYiCU8WrNBhYjVpzbWzrX+Hg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114184] [12/13/14 Regression] ICE: in extract_insn, at recog.cc:2812 (unrecognizable insn ) with _Complex long double and vector VCE Date: Fri, 01 Mar 2024 11:57: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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114184 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uros at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- So, one way to fix this or work around that would be to --- gcc/config/i386/i386-expand.cc.jj 2024-02-26 07:29:27.695974161 +0100 +++ gcc/config/i386/i386-expand.cc 2024-03-01 12:48:59.678574710 +0100 @@ -451,6 +451,12 @@ ix86_expand_move (machine_mode mode, rtx && GET_MODE (SUBREG_REG (op1)) =3D=3D DImode && SUBREG_BYTE (op1) =3D=3D 0) op1 =3D gen_rtx_ZERO_EXTEND (TImode, SUBREG_REG (op1)); + /* As not all values in XFmode are representable in real_value, + we might be called with non-general_operand SUBREGs. */ + if (mode =3D=3D XFmode + && !general_operand (op1, XFmode) + && can_create_pseudo_p ()) + op1 =3D force_reg (XFmode, op1); break; } Though, e.g. md.texi suggests against using force_reg in the mov optab (tho= ugh, perhaps it is meant just that it shouldn't be used during reload). Of course, one could argue it is middle-end's fault for not honoring the mov optab predicate, and that emit_move_insn_1's code =3D optab_handler (mov_optab, mode); if (code !=3D CODE_FOR_nothing) return emit_insn (GEN_FCN (code) (x, y)); should verify the predicate there. Changing that feels very risky in stage= 4 or on release branches, moves are really quite special. Or check it in emit_move_insn callers where there are risks the predicates aren't satisfied (though, there are almost 500 callers of that just in middle-end code).=