[Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
cvs-commit at gcc dot gnu.org
Tue Jun 21 09:39:49 GMT 2022
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <email@example.com>:
Author: Jakub Jelinek <firstname.lastname@example.org>
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 particular
mode, it tries to promote the mode and perform the cmove in the promoted
The testcase in the patch ICEs on arm because in that case we pass temp
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) != mode)
op1 = gen_lowpart (mode, op1);
if (GET_MODE (op2) != mode)
op2 = gen_lowpart (mode, op2);
to change the operand modes.
The following patch fixes it by passing NULL_RTX as target if it has
2022-06-21 Jakub Jelinek <email@example.com>
* 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.
More information about the Gcc-bugs