* [Bug middle-end/105263] [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
@ 2022-04-13 12:44 ` marxin at gcc dot gnu.org
2022-04-13 12:52 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-13 12:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-04-13
Summary|[9/10/11/12 Regression] |[9/10/11/12 Regression]
|ICE: gimple check: expected |ICE: gimple check: expected
|gimple_assign(error_mark), |gimple_assign(error_mark),
|have gimple_nop() in |have gimple_nop() in
|gimple_assign_rhs1, at |gimple_assign_rhs1, at
|gimple.h:2655 with |gimple.h:2655 with
|_Decimal64 -ffast-math |_Decimal64 -ffast-math
| |since
| |r7-950-g8a85cee26eabf5cf
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r7-950-g8a85cee26eabf5cf.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
2022-04-13 12:44 ` [Bug middle-end/105263] [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf marxin at gcc dot gnu.org
@ 2022-04-13 12:52 ` rguenth at gcc dot gnu.org
2022-04-13 12:52 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-13 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
5336 /* Recurse on the LHS of the binary operator, which is guaranteed to
5337 be the non-leaf side. */
5338 tree new_rhs1
5339 = rewrite_expr_tree (SSA_NAME_DEF_STMT (rhs1), rhs_code, opindex +
1, ops,
5340 changed || oe->op != rhs2 || next_changed,
5341 false);
but in this case it's the leaf side...
(gdb) p debug_gimple_stmt (stmt)
u_3 = u_2(D) * u_2(D);
(gdb) p debug_generic_expr (ops.m_vec->m_vecdata[0]->op)
u_2(D)
$11 = void
(gdb) p debug_generic_expr (ops.m_vec->m_vecdata[1]->op)
u_2(D)
$12 = void
(gdb) p debug_generic_expr (ops.m_vec->m_vecdata[2]->op)
_5
$13 = void
(gdb) p debug_generic_expr (ops.m_vec->m_vecdata[3]->op)
{ -1.0e+0 }
U foo (U u)
{
_Decimal64 _1;
U _5;
vector(1) _Decimal64 _6;
<bb 2> [local count: 1073741824]:
u_3 = u_2(D) * u_2(D);
_1 = BIT_FIELD_REF <v(address-taken), 64, 64>;
_5 = {_1};
_6 = -_5;
u_7 = u_3 * _6;
<retval> = u_7;
return <retval>;
so basically the multiplication by -1 trick to handle the negation
breaks the left associativity rewrite because we need to go too deep.
Tricky.
Supposedly we have to pop the -1 before rewriting the expression
but we fail. We fail because build_minus_one_cst doesn't build something
real_minus_onep, in this case the VECTOR_CST part, recognizes. And
that's because of
3156 bool
3157 real_minus_onep (const_tree expr)
...
3164 return real_equal (&TREE_REAL_CST (expr), &dconstm1)
3165 && !(DECIMAL_FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (expr))));
means we have to exclude _Decimal modes from this trick.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
2022-04-13 12:44 ` [Bug middle-end/105263] [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf marxin at gcc dot gnu.org
2022-04-13 12:52 ` rguenth at gcc dot gnu.org
@ 2022-04-13 12:52 ` rguenth at gcc dot gnu.org
2022-04-13 13:59 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-13 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |9.5
Status|NEW |ASSIGNED
Priority|P3 |P2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
` (2 preceding siblings ...)
2022-04-13 12:52 ` rguenth at gcc dot gnu.org
@ 2022-04-13 13:59 ` cvs-commit at gcc dot gnu.org
2022-04-13 14:00 ` [Bug middle-end/105263] [9/10/11 " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-13 13:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:ca145c6306f19272ac8756d88c4eba0bfdf01dfb
commit r12-8142-gca145c6306f19272ac8756d88c4eba0bfdf01dfb
Author: Richard Biener <rguenther@suse.de>
Date: Wed Apr 13 14:53:40 2022 +0200
tree-optimization/105263 - reassoc and DFP
reassoc has certain tricks which in the end depend on the ability
to undo them. For DFP creating a -1. constant is easy but
re-identifying is appearantly not - real_minus_onep rejects those
outright for DFP. So we have to disable (at least) this one trick.
2022-04-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/105263
* tree-ssa-reassoc.cc (try_special_add_to_ops): Do not consume
negates in multiplication chains with DFP.
* gcc.dg/pr105263.c: New testcase.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [9/10/11 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
` (3 preceding siblings ...)
2022-04-13 13:59 ` cvs-commit at gcc dot gnu.org
@ 2022-04-13 14:00 ` rguenth at gcc dot gnu.org
2022-05-19 14:03 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-13 14:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |12.0
Summary|[9/10/11/12 Regression] |[9/10/11 Regression] ICE:
|ICE: gimple check: expected |gimple check: expected
|gimple_assign(error_mark), |gimple_assign(error_mark),
|have gimple_nop() in |have gimple_nop() in
|gimple_assign_rhs1, at |gimple_assign_rhs1, at
|gimple.h:2655 with |gimple.h:2655 with
|_Decimal64 -ffast-math |_Decimal64 -ffast-math
|since |since
|r7-950-g8a85cee26eabf5cf |r7-950-g8a85cee26eabf5cf
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [9/10/11 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
` (4 preceding siblings ...)
2022-04-13 14:00 ` [Bug middle-end/105263] [9/10/11 " rguenth at gcc dot gnu.org
@ 2022-05-19 14:03 ` cvs-commit at gcc dot gnu.org
2022-05-27 9:48 ` [Bug middle-end/105263] [10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-19 14:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:b2557f9081e5bf440abe3fc184cbdaea0447ec64
commit r11-10017-gb2557f9081e5bf440abe3fc184cbdaea0447ec64
Author: Richard Biener <rguenther@suse.de>
Date: Wed Apr 13 14:53:40 2022 +0200
tree-optimization/105263 - reassoc and DFP
reassoc has certain tricks which in the end depend on the ability
to undo them. For DFP creating a -1. constant is easy but
re-identifying is appearantly not - real_minus_onep rejects those
outright for DFP. So we have to disable (at least) this one trick.
2022-04-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/105263
* tree-ssa-reassoc.c (try_special_add_to_ops): Do not consume
negates in multiplication chains with DFP.
* gcc.dg/pr105263.c: New testcase.
(cherry picked from commit ca145c6306f19272ac8756d88c4eba0bfdf01dfb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [10 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
` (5 preceding siblings ...)
2022-05-19 14:03 ` cvs-commit at gcc dot gnu.org
@ 2022-05-27 9:48 ` rguenth at gcc dot gnu.org
2022-06-28 10:49 ` jakub at gcc dot gnu.org
2023-07-07 9:59 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [10 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
` (6 preceding siblings ...)
2022-05-27 9:48 ` [Bug middle-end/105263] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:49 ` jakub at gcc dot gnu.org
2023-07-07 9:59 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/105263] [10 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math since r7-950-g8a85cee26eabf5cf
2022-04-13 12:18 [Bug middle-end/105263] New: [9/10/11/12 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs1, at gimple.h:2655 with _Decimal64 -ffast-math zsojka at seznam dot cz
` (7 preceding siblings ...)
2022-06-28 10:49 ` jakub at gcc dot gnu.org
@ 2023-07-07 9:59 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 9:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105263
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Target Milestone|10.5 |11.4
Known to fail| |10.5.0
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in 11.4.
^ permalink raw reply [flat|nested] 10+ messages in thread