public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1
@ 2022-08-31 16:18 dcb314 at hotmail dot com
2022-08-31 16:23 ` [Bug c++/106794] " dcb314 at hotmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-08-31 16:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
Bug ID: 106794
Summary: ice in vect_transform_slp_perm_load_1
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Created attachment 53525
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53525&action=edit
gzipped C++ source code
For the attached C++ code, recent gcc does this:
$ /home/dcb/gcc/results/bin/gcc -c -w -O3 -ansi -march=bdver2 -ffast-math
bug839.cc
during GIMPLE pass: vect
spheremesh.cpp: In member function ‘void SphereMesh::generateNormals()’:
spheremesh.cpp:123:6: internal compiler error: in operator[], at vec.h:889
0x137b3fd vect_transform_slp_perm_load_1(vec_info*, _slp_tree*, vec<unsigned
int, va_heap, vl_ptr>&, vec<tree_node*
, va_heap, vl_ptr> const&, gimple_stmt_iterator*, poly_int<1u, unsigned long>,
bool, bool, unsigned int*, unsigned
int*, bool)
../../trunk.git/gcc/tree-vect-slp.cc:0
0x137a5c0 vect_optimize_slp_pass::internal_node_cost(_slp_tree*, int, unsigned
int)
../../trunk.git/gcc/tree-vect-slp.cc:4490
0x137cf1b vect_optimize_slp_pass::forward_pass()
../../trunk.git/gcc/tree-vect-slp.cc:4951
0x137fe93 vect_optimize_slp_pass::run()
../../trunk.git/gcc/tree-vect-slp.cc:5498
A reduction is currently running. I will try to identify a git hash range.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/106794] ice in vect_transform_slp_perm_load_1
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
@ 2022-08-31 16:23 ` dcb314 at hotmail dot com
2022-08-31 16:28 ` [Bug tree-optimization/106794] [13 Regression] " pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-08-31 16:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
Git hash range seems to be 4fbe3e6aa74dae5c..3de9fb3235998a05, a distance of 28
commits.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ice in vect_transform_slp_perm_load_1
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
2022-08-31 16:23 ` [Bug c++/106794] " dcb314 at hotmail dot com
@ 2022-08-31 16:28 ` pinskia at gcc dot gnu.org
2022-08-31 16:58 ` dcb314 at hotmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-31 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ice in vect_transform_slp_perm_load_1
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
2022-08-31 16:23 ` [Bug c++/106794] " dcb314 at hotmail dot com
2022-08-31 16:28 ` [Bug tree-optimization/106794] [13 Regression] " pinskia at gcc dot gnu.org
@ 2022-08-31 16:58 ` dcb314 at hotmail dot com
2022-08-31 20:32 ` [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-08-31 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Reduced code seems to be:
template <class T> struct Vector3 {
Vector3();
Vector3(T, T, T);
T length() const;
T x, y, z;
};
template <class T>
Vector3<T>::Vector3(T _x, T _y, T _z) : x(_x), y(_y), z(_z) {}
Vector3<float> cross(Vector3<float> a, Vector3<float> b) {
return Vector3<float>(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z,
a.x * b.y - a.y * b.x);
}
template <class T> T Vector3<T>::length() const { return z; }
int generateNormals_i;
float generateNormals_p2_0, generateNormals_p0_0;
struct SphereMesh {
void generateNormals();
float vertices;
};
void SphereMesh::generateNormals() {
Vector3<float> *faceNormals = new Vector3<float>;
for (int j; j; j++) {
float *p0 = &vertices + 3, *p1 = &vertices + j * 3, *p2 = &vertices + 3,
*p3 = &vertices + generateNormals_i + j * 3;
Vector3<float> v0(p1[0] - generateNormals_p0_0, p1[1] - 1, p1[2] - 2),
v1(0, 1, 2);
if (v0.length())
v1 = Vector3<float>(p3[0] - generateNormals_p2_0, p3[1] - p2[1],
p3[2] - p2[2]);
else
v1 = Vector3<float>(generateNormals_p0_0 - p3[0], p0[1] - p3[1],
p0[2] - p3[2]);
Vector3<float> faceNormal = cross(v0, v1);
faceNormals[j] = faceNormal;
}
}
Flags -c -O3 -ffast-math -march=bdver2 required.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2022-08-31 16:58 ` dcb314 at hotmail dot com
@ 2022-08-31 20:32 ` marxin at gcc dot gnu.org
2022-09-13 10:20 ` rsandifo at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-08-31 20:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-08-31
CC| |marxin at gcc dot gnu.org,
| |rsandifo at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Summary|[13 Regression] ice in |[13 Regression] ICE in
|vect_transform_slp_perm_loa |vect_transform_slp_perm_loa
|d_1 |d_1 since
| |r13-2288-g61c4c989034548f4
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-2288-g61c4c989034548f4, the same as PR106787.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
` (3 preceding siblings ...)
2022-08-31 20:32 ` [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
@ 2022-09-13 10:20 ` rsandifo at gcc dot gnu.org
2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-09-13 10:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Testing a patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
` (4 preceding siblings ...)
2022-09-13 10:20 ` rsandifo at gcc dot gnu.org
@ 2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
2022-09-20 14:29 ` rsandifo at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-09-14 12:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gscfq@t-online.de
--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
*** Bug 106914 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
` (5 preceding siblings ...)
2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
@ 2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
2022-09-20 14:29 ` rsandifo at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-20 14:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:1005c89431cc78a68762643e1bc7249c3959927e
commit r13-2738-g1005c89431cc78a68762643e1bc7249c3959927e
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue Sep 20 15:27:47 2022 +0100
vect: Fix SLP layout handling of masked loads [PR106794]
PR106794 shows that I'd forgotten about masked loads when
doing the SLP layout changes. These loads can't currently
be permuted independently of their mask input, so during
construction they never get a load permutation.
(If we did support permuting masked loads in future, the mask
would need to be in the right order for the load, rather than in
the order implied by the result of the permutation. Since masked
loads can't be partly or fully scalarised in the way that normal
permuted loads can be, there's probably no benefit to fusing the
permutation and the load. Permutation after the fact is probably
good enough.)
gcc/
PR tree-optimization/106794
PR tree-optimization/106914
* tree-vect-slp.cc (vect_optimize_slp_pass::internal_node_cost):
Only consider loads that already have a permutation.
(vect_optimize_slp_pass::start_choosing_layouts): Assert that
loads with permutations are leaf nodes. Prevent any kind of
grouped
access from changing layout if it doesn't have a load permutation.
gcc/testsuite/
* gcc.dg/vect/pr106914.c: New test.
* g++.dg/vect/pr106794.cc: Likewise.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
` (6 preceding siblings ...)
2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
@ 2022-09-20 14:29 ` rsandifo at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-09-20 14:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106794
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-09-20 14:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 16:18 [Bug c++/106794] New: ice in vect_transform_slp_perm_load_1 dcb314 at hotmail dot com
2022-08-31 16:23 ` [Bug c++/106794] " dcb314 at hotmail dot com
2022-08-31 16:28 ` [Bug tree-optimization/106794] [13 Regression] " pinskia at gcc dot gnu.org
2022-08-31 16:58 ` dcb314 at hotmail dot com
2022-08-31 20:32 ` [Bug tree-optimization/106794] [13 Regression] ICE in vect_transform_slp_perm_load_1 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
2022-09-13 10:20 ` rsandifo at gcc dot gnu.org
2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
2022-09-20 14:29 ` rsandifo 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).