https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127473
Bug ID: 127473
Summary: [17 Regression] ICE in vect_build_slp_tree_1 when
building 2017 wrf_r since r17-4390-gd528b3e5314fde
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: needs-reduction
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pheeck at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
Blocks: 26163
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Compile the wrf_r SPEC CPU 2017 benchmark with -Ofast -march=native -flto on an
AMD Zen4 or Intel Ice Lake (3rd generation Xeon) machine (-march=znver4 for the
AMD machine, not sure about the intel one). You'll get this ICE:
during GIMPLE pass: slp
module_diag_afwa.fppized.f90: In function ‘severe_wx_diagnostics’:
module_diag_afwa.fppized.f90:2515:3: internal compiler error: in
vect_build_slp_tree_1, at tree-vect-slp.cc:1764
2515 | SUBROUTINE severe_wx_diagnostics ( wspd10max &
| ^
0x2703a7d internal_error(char const*, ...)
/home/fkastl/gcc/src/gcc/diagnostic-global-context.cc:787
0x7f6f83 fancy_abort(char const*, int, char const*)
/home/fkastl/gcc/src/gcc/diagnostics/context.cc:1813
0x12d7fc9 vect_build_slp_tree_1
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:1764
0x12d7fc9 vect_build_slp_tree_2
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:2184
0x12d974c vect_build_slp_tree
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:2013
0x12dd287 vect_build_slp_instance
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:4303
0x12e49cc vect_analyze_slp(vec_info*, unsigned int, bool)
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:5961
0x12ecbb0 vect_slp_analyze_bb_1
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:10421
0x12ecbb0 vect_slp_region
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:10531
0x12ee47d vect_slp_bbs
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:10754
0x12ee78d vect_slp_function(function*)
/home/fkastl/gcc/src/gcc/tree-vect-slp.cc:10833
0x12fbd96 execute
/home/fkastl/gcc/src/gcc/tree-vectorizer.cc:1573
Bisects to r17-4390-gd528b3e5314fde
commit d528b3e5314fde594080406c95ac39c77881c770
Author: Richard Biener <[email protected]>
AuthorDate: Thu Jul 23 15:51:31 2026 +0200
Commit: Richard Biener <[email protected]>
CommitDate: Thu Sep 17 14:49:51 2026 +0200
Make vect_build_slp_tree_1 compute a set of matches[]
Wasn't able to reduce this, sadly. It is an LTO failure, which makes it harder
to reduce.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2026, 2k17, 2k and 2k6 and
95)