From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B8A903857B91; Tue, 21 Jun 2022 09:39:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8A903857B91 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026 Date: Tue, 21 Jun 2022 09:39:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org 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: Tue, 21 Jun 2022 09:39:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106030 --- Comment #7 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:2df1df945fac85d7b3d084001414a66a2709d8fe commit r13-1185-g2df1df945fac85d7b3d084001414a66a2709d8fe Author: Jakub Jelinek Date: Tue Jun 21 11:38:59 2022 +0200 expand: Fix up expand_cond_expr_using_cmove [PR106030] If expand_cond_expr_using_cmove can't find a cmove optab for a particul= ar mode, it tries to promote the mode and perform the cmove in the promoted mode. The testcase in the patch ICEs on arm because in that case we pass temp which has the promoted mode (SImode) as target to expand_operands where the operands have the non-promoted mode (QImode). Later on the function uses paradoxical subregs: if (GET_MODE (op1) !=3D mode) op1 =3D gen_lowpart (mode, op1); if (GET_MODE (op2) !=3D mode) op2 =3D gen_lowpart (mode, op2); to change the operand modes. The following patch fixes it by passing NULL_RTX as target if it has promoted mode. 2022-06-21 Jakub Jelinek PR middle-end/106030 * expr.cc (expand_cond_expr_using_cmove): Pass NULL_RTX instead= of temp to expand_operands if mode has been promoted. * gcc.c-torture/compile/pr106030.c: New test.=