https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127579

            Bug ID: 127579
           Summary: [16/17 Regression] ICE when building with
                    -mgeneral-regs -march=armv9-a since
                    g:b3355804c7054bce288b643ce127ec5e9d0c2061
           Product: gcc
           Version: 16.2.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---

The following testcase

char a;
int b;
void e() {
  char *c = (char *)&b;
  int d = 0;
  for (; d < b; d++)
    a += c[d];
}

compiled with -O2 -mgeneral-regs-only -march=armv9-a ices with a segfault

internal compiler error: Segmentation fault
//   446 | ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
//       | ^~~~~~~~~~~~~~~~~~~~
// 0xf3fc23 internal_error(char const*, ...)
//      ../../src/gcc/diagnostic-global-context.cc:787
// 0x976543 crash_signal
//      ../../src/gcc/toplev.cc:325
// 0x1e43f74 info_for_reduction(_loop_vec_info*, _slp_tree*)
//      ../../src/gcc/tree-vect-loop.cc:5060
// 0x1a7946f aarch64_force_single_cycle
//      ../../src/gcc/config/aarch64/aarch64.cc:18284
// 0x1a7946f aarch64_vector_costs::count_ops(unsigned int, vect_cost_for_stmt,
_stmt_vec_info*, _slp_tree*, aarch64_vec_op_count*)
//      ../../src/gcc/config/aarch64/aarch64.cc:18314
// 0x1a4bfab aarch64_vector_costs::add_stmt_cost(int, vect_cost_for_stmt,
_stmt_vec_info*, _slp_tree*, tree_node*, int, vect_cost_model_location)
//      ../../src/gcc/config/aarch64/aarch64.cc:18782
// 0x1da80e3 add_stmt_cost(vector_costs*, int, vect_cost_for_stmt,
_stmt_vec_info*, _slp_tree*, tree_node*, int, vect_cost_model_location)
//      ../../src/gcc/tree-vectorizer.h:2099
// 0x1da80e3 add_stmt_costs(vector_costs*, vec<stmt_info_for_cost, va_heap,
vl_ptr>*)
//      ../../src/gcc/tree-vectorizer.h:2129
// 0x19103a7 vect_slp_analyze_operations(vec_info*)
//      ../../src/gcc/tree-vect-slp.cc:9299
// 0x19cfcaf vect_analyze_loop_2
//      ../../src/gcc/tree-vect-loop.cc:2358
// 0x1de8807 vect_analyze_loop_1
//      ../../src/gcc/tree-vect-loop.cc:2826
// 0x199ca13 vect_analyze_loop(loop*, gimple*, vec_info_shared*)
//      ../../src/gcc/tree-vect-loop.cc:3007
// 0x1de2a2b try_vectorize_loop_1
//      ../../src/gcc/tree-vectorizer.cc:1097
// 0x1de2a2b try_vectorize_loop
//      ../../src/gcc/tree-vectorizer.cc:1216
// 0x1997683 execute
//      ../../src/gcc/tree-vectorizer.cc:1333

since g:b3355804c7054bce288b643ce127ec5e9d0c2061

commit b3355804c7054bce288b643ce127ec5e9d0c2061
Author: Richard Biener

    Introduce abstraction for vect reduction info, tracked from SLP nodes

Reply via email to