https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104112
Bug ID: 104112 Summary: ICE with -Ofast -march=armv8.2-a+sve -msve-vector-bits=512 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gilles.gouaillardet at gmail dot com Target Milestone: --- Created attachment 52226 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52226&action=edit a simple reproducer The attached reproducer (trimmed from BLAS) can be used to evidence a crash of the compiler: $ g++ -march=armv8.2-a+sve -msve-vector-bits=512 -Ofast -c boom.cpp during GIMPLE pass: vect boom.cpp: In function ?void boom(int, double*, double*)?: boom.cpp:4:1: internal compiler error: Segmentation fault 4 | boom(int n, | ^~~~ 0x10436f3 crash_signal ../.././gcc/toplev.c:328 0x12f86ec tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../.././gcc/tree.h:3495 0x12f86ec vect_create_partial_epilog ../.././gcc/tree-vect-loop.c:4953 0x13050ff vect_transform_cycle_phi(_loop_vec_info*, _stmt_vec_info*, gimple**, _slp_tree*, _slp_instance*) ../.././gcc/tree-vect-loop.c:7728 0x12f562b vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*) ../.././gcc/tree-vect-stmts.c:10999 0x1311e9b vect_transform_loop(_loop_vec_info*, gimple*) ../.././gcc/tree-vect-loop.c:9686 0x13416db try_vectorize_loop_1 ../.././gcc/tree-vectorizer.c:1103 0x13418b7 try_vectorize_loop_1 ../.././gcc/tree-vectorizer.c:1141 0x1342317 vectorize_loops() ../.././gcc/tree-vectorizer.c:1242 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. FWIW, g++ works just fine with the slightly rewritten (e.g. do not use a local variable) noboom.cpp Based on my snapshots, the issue occurred first between 20210711 and 20210718 (I am now running a git bisect to point to a suspect commit)