public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512
@ 2021-12-22 8:14 vsevolod.livinskij at frtk dot ru
2021-12-22 8:18 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2021-12-22 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
Bug ID: 103800
Summary: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with
-O3 -march=skylake-avx512
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vsevolod.livinskij at frtk dot ru
Target Milestone: ---
Link to the Compiler Explorer: https://godbolt.org/z/bWdof9c8s
Reproducer:
int a;
long b;
extern int c[], d[];
extern bool e[];
void f() {
if (a)
;
for (;;) {
for (int g = 2; g; g = a)
d[g] = 0;
for (int h = 1; h < 13; h++)
e[h] = b ? (short)c[4 + h - 1] : c[4 + h - 1];
}
}
Error:
>$ g++ -O3 -march=skylake-avx512 -c func.cpp
during GIMPLE pass: slp
func.cpp: In function 'void f()':
func.cpp:5:6: internal compiler error: in vectorizable_phi, at
tree-vect-loop.c:7861
5 | void f() {
| ^
0x8bca05 vectorizable_phi(vec_info*, _stmt_vec_info*, gimple**, _slp_tree*,
vec<stmt_info_for_cost, va_heap, vl_ptr>*)
/testing/gcc/gcc_src_master/gcc/tree-vect-loop.c:7861
0x20abd84 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
/testing/gcc/gcc_src_master/gcc/tree-vect-stmts.c:11125
0x14a2186 vect_slp_analyze_node_operations_1
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:4481
0x14a2186 vect_slp_analyze_node_operations
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:4640
0x14a2097 vect_slp_analyze_node_operations
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:4620
0x14a2097 vect_slp_analyze_node_operations
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:4620
0x14a2097 vect_slp_analyze_node_operations
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:4620
0x14a4811 vect_slp_analyze_operations(vec_info*)
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:4879
0x14a9605 vect_slp_analyze_bb_1
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:5817
0x14a9605 vect_slp_region
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:5864
0x14aae33 vect_slp_bbs
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:6056
0x14ab22c vect_slp_function(function*)
/testing/gcc/gcc_src_master/gcc/tree-vect-slp.c:6144
0x14b1c82 execute
/testing/gcc/gcc_src_master/gcc/tree-vectorizer.c:1503
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
GCC version:
gcc version 12.0.0 20211219 (fcbf94a5be9e0c1ecad92da773a6632b86b7f70a) (GCC)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
@ 2021-12-22 8:18 ` pinskia at gcc dot gnu.org
2021-12-22 9:00 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-22 8:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-12-22
Keywords| |needs-bisection
Target Milestone|--- |12.0
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|vectorizable_phi, at |vectorizable_phi, at
|tree-vect-loop.c:7861 with |tree-vect-loop.c:7861 with
|-O3 -march=skylake-avx512 |-O3
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You don't even need to have -march=skylake-avx512.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
2021-12-22 8:18 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 pinskia at gcc dot gnu.org
@ 2021-12-22 9:00 ` marxin at gcc dot gnu.org
2021-12-22 9:00 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-22 9:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|vectorizable_phi, at |vectorizable_phi, at
|tree-vect-loop.c:7861 with |tree-vect-loop.c:7861 with
|-O3 |-O3 since
| |r12-5626-g0194d92c35ca8b3a
CC| |marxin at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5626-g0194d92c35ca8b3a.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
2021-12-22 8:18 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 pinskia at gcc dot gnu.org
2021-12-22 9:00 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a marxin at gcc dot gnu.org
@ 2021-12-22 9:00 ` marxin at gcc dot gnu.org
2022-01-03 13:27 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-22 9:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
` (2 preceding siblings ...)
2021-12-22 9:00 ` marxin at gcc dot gnu.org
@ 2022-01-03 13:27 ` rguenth at gcc dot gnu.org
2022-01-04 14:46 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-03 13:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
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 #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
` (3 preceding siblings ...)
2022-01-03 13:27 ` rguenth at gcc dot gnu.org
@ 2022-01-04 14:46 ` rguenth at gcc dot gnu.org
2022-01-04 15:52 ` cvs-commit at gcc dot gnu.org
2022-01-04 15:52 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-04 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So in this case we have an SLP tree for a merge PHI with scalar bools where
we do
t.c:10:12: note: using boolean precision 32 for iftmp.1_168 = pretmp_175 !=
0;
t.c:10:12: note: using boolean precision 16 for _177 = _176 != 0;
t.c:10:12: note: using boolean precision 16 for iftmp.1_173 = PHI
<iftmp.1_168(6), _177(7)>
but pattern detection doesn't have any code to insert compensation on PHI
edges.
We now detect the mismatch but I fell foul of thinking it can only happen for
non-bool vs. bool context ...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
` (4 preceding siblings ...)
2022-01-04 14:46 ` rguenth at gcc dot gnu.org
@ 2022-01-04 15:52 ` cvs-commit at gcc dot gnu.org
2022-01-04 15:52 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-04 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
--- 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:88e861655b3e59bc982ba22cd6e2e7348efae866
commit r12-6211-g88e861655b3e59bc982ba22cd6e2e7348efae866
Author: Richard Biener <rguenther@suse.de>
Date: Tue Jan 4 15:49:50 2022 +0100
tree-optimization/103800 - sanity check more PHI vectorization
Bool pattern detection doesn't really handle PHIs well so we have
to be prepared for mismatched vector types in more cases than
originally thought.
2022-01-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/103800
* tree-vect-loop.c (vectorizable_phi): Remove assert and
expand comment.
* gcc.dg/vect/bb-slp-pr103800.c: New testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
` (5 preceding siblings ...)
2022-01-04 15:52 ` cvs-commit at gcc dot gnu.org
@ 2022-01-04 15:52 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-04 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103800
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] 8+ messages in thread
end of thread, other threads:[~2022-01-04 15:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 8:14 [Bug tree-optimization/103800] New: ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
2021-12-22 8:18 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 pinskia at gcc dot gnu.org
2021-12-22 9:00 ` [Bug tree-optimization/103800] [12 Regression] ICE in vectorizable_phi, at tree-vect-loop.c:7861 with -O3 since r12-5626-g0194d92c35ca8b3a marxin at gcc dot gnu.org
2021-12-22 9:00 ` marxin at gcc dot gnu.org
2022-01-03 13:27 ` rguenth at gcc dot gnu.org
2022-01-04 14:46 ` rguenth at gcc dot gnu.org
2022-01-04 15:52 ` cvs-commit at gcc dot gnu.org
2022-01-04 15:52 ` 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).