From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 830C0385701E; Wed, 3 May 2023 15:18:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 830C0385701E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683127118; bh=1mW7csaCorBrb5XWSq7gqRGpbzZ1cPgOL6gfecYrXsY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vTQoMdIAXagv8BK3SFSJ+8D644+CSegtwy2OgzKamTCrvPTC5MwhVvYVzXb/IeYWT q6tcdoHfKvdZKGAIp4sQBmAXYvZeUjIQEKP1pSJAYLQTsJhGT/TypNqmhVs/WDwzhx eIzf/HQnVnJr92zElE2/rDhtG220rhbYtt1piXVk= 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: Wed, 03 May 2023 15:18:37 +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: RESOLVED X-Bugzilla-Resolution: FIXED 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106030 --- Comment #11 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:89741783f6e7127d4d8be5a5e8e4fb7d5785f8a6 commit r10-11332-g89741783f6e7127d4d8be5a5e8e4fb7d5785f8a6 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.c (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. (cherry picked from commit 2df1df945fac85d7b3d084001414a66a2709d8fe)=