* [Bug c/106030] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
@ 2022-06-19 16:08 ` dcb314 at hotmail dot com
2022-06-20 12:11 ` [Bug target/106030] " jakub at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dcb314 at hotmail dot com @ 2022-06-19 16:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
I should mention that this code is fine on x86_64, but breaks on arm-32 native
and cross.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/106030] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
2022-06-19 16:08 ` [Bug c/106030] " dcb314 at hotmail dot com
@ 2022-06-20 12:11 ` jakub at gcc dot gnu.org
2022-06-20 12:11 ` [Bug middle-end/106030] " jakub at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-20 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Deobfuscated:
int a, b, c;
char
foo (int x, int y)
{
return x * y;
}
void
bar (void)
{
char d = (foo <= b) * a;
c = foo (2 != bar, d);
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
2022-06-19 16:08 ` [Bug c/106030] " dcb314 at hotmail dot com
2022-06-20 12:11 ` [Bug target/106030] " jakub at gcc dot gnu.org
@ 2022-06-20 12:11 ` jakub at gcc dot gnu.org
2022-06-20 12:52 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-20 12:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2022-06-20
Component|target |middle-end
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2022-06-20 12:11 ` [Bug middle-end/106030] " jakub at gcc dot gnu.org
@ 2022-06-20 12:52 ` jakub at gcc dot gnu.org
2022-06-20 14:32 ` acoplan at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-20 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 53168
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53168&action=edit
gcc13-pr106030.patch
Untested fix. But it is unclear when it started...
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (3 preceding siblings ...)
2022-06-20 12:52 ` jakub at gcc dot gnu.org
@ 2022-06-20 14:32 ` acoplan at gcc dot gnu.org
2022-06-20 14:34 ` [Bug middle-end/106030] [13 Regression] " jakub at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: acoplan at gcc dot gnu.org @ 2022-06-20 14:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Started with r13-673-gd863ba23fb16122bb0547b0c678173be0d98f43c :
commit d863ba23fb16122bb0547b0c678173be0d98f43c
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Thu May 19 17:54:38 2022 +0100
PR middle-end/98865: Expand X*Y as X&-Y when Y is [0,1].
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (4 preceding siblings ...)
2022-06-20 14:32 ` acoplan at gcc dot gnu.org
@ 2022-06-20 14:34 ` jakub at gcc dot gnu.org
2022-06-20 14:34 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-20 14:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Summary|ice in emit_move_insn, at |[13 Regression] ice in
|expr.cc:4026 |emit_move_insn, at
| |expr.cc:4026
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (5 preceding siblings ...)
2022-06-20 14:34 ` [Bug middle-end/106030] [13 Regression] " jakub at gcc dot gnu.org
@ 2022-06-20 14:34 ` jakub at gcc dot gnu.org
2022-06-20 14:49 ` dcb314 at hotmail dot com
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-20 14:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Still it is latent on the release branches.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (6 preceding siblings ...)
2022-06-20 14:34 ` jakub at gcc dot gnu.org
@ 2022-06-20 14:49 ` dcb314 at hotmail dot com
2022-06-21 9:39 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dcb314 at hotmail dot com @ 2022-06-20 14:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
Around 22,000 executions of csmith per 24 hours and feeding the results
to trunk gcc are proving their value in flushing out bugs in gcc.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (7 preceding siblings ...)
2022-06-20 14:49 ` dcb314 at hotmail dot com
@ 2022-06-21 9:39 ` cvs-commit at gcc dot gnu.org
2022-06-28 15:38 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-21 9:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2df1df945fac85d7b3d084001414a66a2709d8fe
commit r13-1185-g2df1df945fac85d7b3d084001414a66a2709d8fe
Author: Jakub Jelinek <jakub@redhat.com>
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
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) != 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
promoted mode.
2022-06-21 Jakub Jelinek <jakub@redhat.com>
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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (8 preceding siblings ...)
2022-06-21 9:39 ` cvs-commit at gcc dot gnu.org
@ 2022-06-28 15:38 ` cvs-commit at gcc dot gnu.org
2022-06-28 15:48 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-28 15:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:d068623e5b109e635e2ec2acfcf15e7c50c7f15c
commit r12-8522-gd068623e5b109e635e2ec2acfcf15e7c50c7f15c
Author: Jakub Jelinek <jakub@redhat.com>
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
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) != 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
promoted mode.
2022-06-21 Jakub Jelinek <jakub@redhat.com>
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.
(cherry picked from commit 2df1df945fac85d7b3d084001414a66a2709d8fe)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (9 preceding siblings ...)
2022-06-28 15:38 ` cvs-commit at gcc dot gnu.org
@ 2022-06-28 15:48 ` jakub at gcc dot gnu.org
2022-11-04 8:30 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:18 ` cvs-commit at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 15:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (10 preceding siblings ...)
2022-06-28 15:48 ` jakub at gcc dot gnu.org
@ 2022-11-04 8:30 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:18 ` cvs-commit at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-04 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:d9b72d8d03134813d5fa84cffb190027fd29f6d6
commit r11-10353-gd9b72d8d03134813d5fa84cffb190027fd29f6d6
Author: Jakub Jelinek <jakub@redhat.com>
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
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) != 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
promoted mode.
2022-06-21 Jakub Jelinek <jakub@redhat.com>
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)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/106030] [13 Regression] ice in emit_move_insn, at expr.cc:4026
2022-06-19 16:02 [Bug c/106030] New: ice in emit_move_insn, at expr.cc:4026 dcb314 at hotmail dot com
` (11 preceding siblings ...)
2022-11-04 8:30 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 15:18 ` cvs-commit at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:89741783f6e7127d4d8be5a5e8e4fb7d5785f8a6
commit r10-11332-g89741783f6e7127d4d8be5a5e8e4fb7d5785f8a6
Author: Jakub Jelinek <jakub@redhat.com>
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
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) != 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
promoted mode.
2022-06-21 Jakub Jelinek <jakub@redhat.com>
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)
^ permalink raw reply [flat|nested] 14+ messages in thread