public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95272] New: ice in vectorizable_reduction, at tree-vect-loop.c:6197
@ 2020-05-22 16:05 dcb314 at hotmail dot com
2020-05-25 6:59 ` [Bug tree-optimization/95272] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2020-05-22 16:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95272
Bug ID: 95272
Summary: ice in vectorizable_reduction, at
tree-vect-loop.c:6197
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this C++ code:
enum { a = 5, b };
typedef struct {
int c[b];
} d;
extern d e[];
int f;
int g[6];
void h() {
int i;
for (; f; f++) {
i = 0;
for (; i < b; i++)
if (e[f].c[i])
g[i] = e[f].c[i];
}
}
compiled by recent gcc trunk and compiler flags -w -c -O3 -march=cooperlake,
I get:
during GIMPLE pass: vect
bug613.cc: In function ‘void h()’:
bug613.cc:8:6: internal compiler error: in vectorizable_reduction, at
tree-vect-
loop.c:6197
8 | void h() {
| ^
0x11e91f5 vectorizable_reduction(_loop_vec_info*, _stmt_vec_info*, _slp_tree*,
_
slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
../../trunk.git/gcc/tree-vect-loop.c:6197
0x11bb55d vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_
instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
../../trunk.git/gcc/tree-vect-stmts.c:11067
0x120767d vect_slp_analyze_node_operations_1(vec_info*, _slp_tree*,
_slp_instanc
e*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
../../trunk.git/gcc/tree-vect-slp.c:2676
0x120767d vect_slp_analyze_node_operations(vec_info*, _slp_tree*,
_slp_instance*
, hash_set<_slp_tree*, false, default_hash_traits<_slp_tree*> >&,
hash_set<_slp_
tree*, false, default_hash_traits<_slp_tree*> >&, vec<stmt_info_for_cost,
va_hea
p, vl_ptr>*)
../../trunk.git/gcc/tree-vect-slp.c:2844
The problem first seems to occur sometime between dates 20200521 and
20200522. git hashes f094665d465..e740f3d7314
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197
2020-05-22 16:05 [Bug c++/95272] New: ice in vectorizable_reduction, at tree-vect-loop.c:6197 dcb314 at hotmail dot com
@ 2020-05-25 6:59 ` rguenth at gcc dot gnu.org
2020-05-25 8:57 ` [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197 since r11-564-g79f0451c67e8ed56 rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 6:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95272
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |tree-optimization
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2020-05-25
Ever confirmed|0 |1
Version|unknown |11.0
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197 since r11-564-g79f0451c67e8ed56
2020-05-22 16:05 [Bug c++/95272] New: ice in vectorizable_reduction, at tree-vect-loop.c:6197 dcb314 at hotmail dot com
2020-05-25 6:59 ` [Bug tree-optimization/95272] " rguenth at gcc dot gnu.org
@ 2020-05-25 8:57 ` rguenth at gcc dot gnu.org
2020-05-29 11:00 ` cvs-commit at gcc dot gnu.org
2020-05-29 11:01 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95272
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
static void
vect_slp_rearrange_stmts (slp_tree node, unsigned int group_size,
vec<unsigned> permutation,
hash_set<slp_tree> &visited)
{
...
/* ??? Computation nodes are isomorphic and need no rearrangement.
This is a quick hack to cover those where rearrangement breaks
semantics because only the first stmt is guaranteed to have the
correct operation code due to others being swapped or inverted. */
stmt_vec_info first = SLP_TREE_SCALAR_STMTS (node)[0];
if (is_gimple_assign (first->stmt)
&& gimple_assign_rhs_code (first->stmt) == COND_EXPR)
return;
bites back. This leaves us with an inconsistent SLP tree (harmless before
the change exposing the ICE).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197 since r11-564-g79f0451c67e8ed56
2020-05-22 16:05 [Bug c++/95272] New: ice in vectorizable_reduction, at tree-vect-loop.c:6197 dcb314 at hotmail dot com
2020-05-25 6:59 ` [Bug tree-optimization/95272] " rguenth at gcc dot gnu.org
2020-05-25 8:57 ` [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197 since r11-564-g79f0451c67e8ed56 rguenth at gcc dot gnu.org
@ 2020-05-29 11:00 ` cvs-commit at gcc dot gnu.org
2020-05-29 11:01 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29 11:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95272
--- 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:c735929a2503a7d03ac4739bba5b25336bf954c3
commit r11-718-gc735929a2503a7d03ac4739bba5b25336bf954c3
Author: Richard Biener <rguenther@suse.de>
Date: Fri May 29 12:00:00 2020 +0200
tree-optimization/95272 - add SLP_TREE_REPRESENTATIVE
This adds SLP_TREE_REPRESENTATIVE - a representative stmt-info that
is used by SLP analysis and code generation. This avoids the need
for the hack in vect_slp_rearrange_stmts which previously avoided
to re-arrange stmts that might not have been isomorphic because
of operand swapping. It also plays nice with future directions of SLP
and for the forseeable future is easier than replicating more and
more info in the SLP node as long as non-SLP is in-tree.
2020-05-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/95272
* tree-vectorizer.h (_slp_tree::representative): Add.
(SLP_TREE_REPRESENTATIVE): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Adjust SLP
node gathering.
(vectorizable_live_operation): Use the representative to
attach the reduction info to.
* tree-vect-slp.c (_slp_tree::_slp_tree): Initialize
SLP_TREE_REPRESENTATIVE.
(vect_create_new_slp_node): Likewise.
(slp_copy_subtree): Copy it.
(vect_slp_rearrange_stmts): Re-arrange even COND_EXPR stmts.
(vect_slp_analyze_node_operations_1): Pass the representative
to vect_analyze_stmt.
(vect_schedule_slp_instance): Pass the representative to
vect_transform_stmt.
* gcc.dg/vect/pr95272.c: New testcase.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197 since r11-564-g79f0451c67e8ed56
2020-05-22 16:05 [Bug c++/95272] New: ice in vectorizable_reduction, at tree-vect-loop.c:6197 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2020-05-29 11:00 ` cvs-commit at gcc dot gnu.org
@ 2020-05-29 11:01 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-29 11:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95272
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Finally fixed. Sorry for the delay.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-29 11:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 16:05 [Bug c++/95272] New: ice in vectorizable_reduction, at tree-vect-loop.c:6197 dcb314 at hotmail dot com
2020-05-25 6:59 ` [Bug tree-optimization/95272] " rguenth at gcc dot gnu.org
2020-05-25 8:57 ` [Bug tree-optimization/95272] ice in vectorizable_reduction, at tree-vect-loop.c:6197 since r11-564-g79f0451c67e8ed56 rguenth at gcc dot gnu.org
2020-05-29 11:00 ` cvs-commit at gcc dot gnu.org
2020-05-29 11:01 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).