https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96974
Bug ID: 96974 Summary: [10/11 Regression] ICE in vect_get_vector_types_for_stmt compiling for SVE Product: gcc Version: unknown Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ktkachov at gcc dot gnu.org Target Milestone: --- Target: aarch64*-*-* The reduced testcase: float a; int b () { return __builtin_lrintf(a); } struct c { float d; c() { for (int e = 0; e < 9; e++) coeffs[e] = d ? b() : 0; } int coeffs[10]; } f; ICEs with g++ -Ofast -march=armv8.2-a+sve during GIMPLE pass: slp foo.cc: In function '(static initializers for foo.cc)': foo.cc:14:4: internal compiler error: in vect_get_vector_types_for_stmt, at tree-vect-stmts.c:12055 14 | } f; | ^ 0x126e44d vect_get_vector_types_for_stmt(vec_info*, _stmt_vec_info*, tree_node**, tree_node**, unsigned int) $SRC/gcc/tree-vect-stmts.c:12054 0x12a7b9a vect_build_slp_tree_1 $SRC/gcc/tree-vect-slp.c:801 0x12a7b9a vect_build_slp_tree_2 $SRC/gcc/tree-vect-slp.c:1284 0x12a642b vect_build_slp_tree $SRC/gcc/tree-vect-slp.c:1195 0x12a8a30 vect_build_slp_tree_2 $SRC/gcc/tree-vect-slp.c:1413 0x12a642b vect_build_slp_tree $SRC/gcc/tree-vect-slp.c:1195 0x12a8a30 vect_build_slp_tree_2 $SRC/gcc/tree-vect-slp.c:1413 0x12a642b vect_build_slp_tree $SRC/gcc/tree-vect-slp.c:1195 0x12ab23e vect_analyze_slp_instance $SRC/gcc/tree-vect-slp.c:2210 0x12aea06 vect_analyze_slp(vec_info*, unsigned int) $SRC/gcc/tree-vect-slp.c:2418 0x12b0fc3 vect_slp_analyze_bb_1 $SRC/gcc/tree-vect-slp.c:3388 0x12b0fc3 vect_slp_region $SRC/gcc/tree-vect-slp.c:3498 0x12b0fc3 vect_slp_bb(basic_block_def*) $SRC/gcc/tree-vect-slp.c:3628 0x12b4a70 execute $SRC/gcc/tree-vectorizer.c:1429 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.