public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
@ 2021-03-29 5:09 asolokha at gmx dot com
2021-03-29 7:34 ` [Bug target/99807] " ktkachov at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2021-03-29 5:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
Bug ID: 99807
Summary: ICE in vect_slp_analyze_node_operations_1, at
tree-vect-slp.c:3727
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: aarch64-linux-gnu
gfortran-11.0.1-alpha20210328 snapshot
(g:499fa254ae8c9752d8c2cf3130b13ffddfd83546) ICEs when compiling the following
testcase w/ -march=armv8.3-a -O1 -ftree-slp-vectorize:
subroutine cppco(ap, z)
implicit none
complex :: ap(*), z(*)
z(1) = z(1) + z(2) * (ap(1))
return
end subroutine cppco
% aarch64-linux-gnu-gfortran-11.0.1 -march=armv8.3-a -O1 -ftree-slp-vectorize
-c xrd4htvk.f90
during GIMPLE pass: slp
xrd4htvk.f90:1:16:
1 | subroutine cppco(ap, z)
| ^
internal compiler error: in vect_slp_analyze_node_operations_1, at
tree-vect-slp.c:3727
0x7c41bf vect_slp_analyze_node_operations_1
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:3727
0x7c41bf vect_slp_analyze_node_operations
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:3933
0x123510b vect_slp_analyze_node_operations
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:3913
0x123510b vect_slp_analyze_node_operations
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:3913
0x1237972 vect_slp_analyze_operations(vec_info*)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:4120
0x123b01d vect_slp_analyze_bb_1
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:4899
0x123b01d vect_slp_region
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:4945
0x123b01d vect_slp_bbs
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:5095
0x123ce3c vect_slp_function(function*)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vect-slp.c:5181
0x12437fa execute
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210328/work/gcc-11-20210328/gcc/tree-vectorizer.c:1450
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99807] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
@ 2021-03-29 7:34 ` ktkachov at gcc dot gnu.org
2021-03-29 7:55 ` [Bug target/99807] [11 Regression] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2021-03-29 7:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktkachov at gcc dot gnu.org,
| |tnfchris at gcc dot gnu.org
Priority|P3 |P1
Known to fail| |11.0
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |11.0
Last reconfirmed| |2021-03-29
Known to work| |10.2.1
--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed. Tamar, can you have a look please?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99807] [11 Regression] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
2021-03-29 7:34 ` [Bug target/99807] " ktkachov at gcc dot gnu.org
@ 2021-03-29 7:55 ` rguenth at gcc dot gnu.org
2021-03-29 8:15 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-29 7:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
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
Status|NEW |ASSIGNED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine. Some longer standing "issue".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99807] [11 Regression] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
2021-03-29 7:34 ` [Bug target/99807] " ktkachov at gcc dot gnu.org
2021-03-29 7:55 ` [Bug target/99807] [11 Regression] " rguenth at gcc dot gnu.org
@ 2021-03-29 8:15 ` rguenth at gcc dot gnu.org
2021-03-29 8:35 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-29 8:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Just to say we currently require a ("random") SLP_TREE_REPRESENTATIVE even on
VEC_PERM_EXPR SLP nodes. With the testcase the choosen one is no longer
explicitely referenced and thus it does not get marked by SLP. Note this will
also cause it to turn hybrid - so it's probably one of the cases where the
SLP marking as patterns "helped".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99807] [11 Regression] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
` (2 preceding siblings ...)
2021-03-29 8:15 ` rguenth at gcc dot gnu.org
@ 2021-03-29 8:35 ` rguenth at gcc dot gnu.org
2021-03-29 11:13 ` cvs-commit at gcc dot gnu.org
2021-03-29 11:13 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-29 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Just to say we currently require a ("random") SLP_TREE_REPRESENTATIVE even on
> VEC_PERM_EXPR SLP nodes. With the testcase the choosen one is no longer
> explicitely referenced and thus it does not get marked by SLP. Note this
> will
> also cause it to turn hybrid - so it's probably one of the cases where the
> SLP marking as patterns "helped".
We can fix the ICE by delaying the assert but the other issue still shows
in costing (which also only walks participating stmts):
t.f90:5:30: note: Cost model analysis:
0x35e56c0 _25 1 times scalar_store costs 1 in body
0x35e56c0 _26 1 times scalar_store costs 1 in body
0x35e56c0 _11 + _23 1 times scalar_stmt costs 1 in body
0x35e56c0 _12 + _24 1 times scalar_stmt costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[0]> 1 times scalar_load costs 1 in body
0x35e56c0 IMAGPART_EXPR <(*z_8(D))[0]> 1 times scalar_load costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times scalar_load costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[0]> 1 times unaligned_load (misalign -1)
costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[0]> 1 times vec_perm costs 2 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times unaligned_load (misalign -1)
costs 1 in body
0x35e56c0 <unknown> 1 times vec_perm costs 2 in body
0x35e56c0 <unknown> 1 times vec_construct costs 2 in prologue
0x35e56c0 .COMPLEX_FMA (_25, _25, _25) 1 times vector_stmt costs 1 in body
0x35e56c0 <unknown> 1 times vec_construct costs 2 in prologue
0x35e56c0 _25 1 times unaligned_store (misalign -1) costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times vec_to_scalar costs 2 in
epilogue
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times vec_to_scalar costs 2 in
epilogue
t.f90:5:30: note: Cost model analysis for part in loop 0:
Vector cost: 16
Scalar cost: 7
t.f90:5:30: missed: not vectorized: vectorization is not profitable.
so we're not costing all the scalar stmts covered by the .COMPLEX_FMA
expression
because scalar costing only looks at SLP_TREE_SCALAR_STMTS (it would not
cost multiple stmts covering a scalar pattern either).
That said, I'm going to fix this simple to deal with ICE now, all the rest
needs more thoughts (and I'd like to defer any solution to GCC 12 for the
moment).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99807] [11 Regression] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
` (3 preceding siblings ...)
2021-03-29 8:35 ` rguenth at gcc dot gnu.org
@ 2021-03-29 11:13 ` cvs-commit at gcc dot gnu.org
2021-03-29 11:13 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-29 11:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
--- Comment #5 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:8cf2812cfceaf464dff99651b2d911d6e12b52b7
commit r11-7889-g8cf2812cfceaf464dff99651b2d911d6e12b52b7
Author: Richard Biener <rguenther@suse.de>
Date: Mon Mar 29 13:10:37 2021 +0200
tree-optimization/99807 - avoid bogus assert with permute SLP node
This avoids asserting anything on the SLP_TREE_REPRESENTATIVE of
an SLP permute node (which shouldn't be there).
2021-03-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/99807
* tree-vect-slp.c (vect_slp_analyze_node_operations_1): Move
assert below VEC_PERM handling.
* gfortran.dg/vect/pr99807.f90: New testcase.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/99807] [11 Regression] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
` (4 preceding siblings ...)
2021-03-29 11:13 ` cvs-commit at gcc dot gnu.org
@ 2021-03-29 11:13 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-29 11:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-29 11:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 5:09 [Bug target/99807] New: ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727 asolokha at gmx dot com
2021-03-29 7:34 ` [Bug target/99807] " ktkachov at gcc dot gnu.org
2021-03-29 7:55 ` [Bug target/99807] [11 Regression] " rguenth at gcc dot gnu.org
2021-03-29 8:15 ` rguenth at gcc dot gnu.org
2021-03-29 8:35 ` rguenth at gcc dot gnu.org
2021-03-29 11:13 ` cvs-commit at gcc dot gnu.org
2021-03-29 11:13 ` 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).