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

            Bug ID: 109838
           Summary: [14 Regression] ICE on libaom-3.6.0: in
                    ix86_widen_mult_cost, at config/i386/i386.cc:20444
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

This week's gcc r14-799-g6190a74ebee694 ICEs on libaom-3.6.0. Minimal
reproducer:

// $ cat pickrst_avx2.c.c
unsigned char acc_stat_win7_one_line_avx2_X1;
int acc_stat_win7_one_line_avx2(int M_int[][0]) {
  int k, l;
  for (; k; k++) {
    unsigned char *dgd_ijk;
    l = 0;
    for (; l < 2; l++)
      M_int[k][l] += dgd_ijk[l] * acc_stat_win7_one_line_avx2_X1;
  }
}

$ gcc -O3 -fPIC -mavx2 -c pickrst_avx2.c.c
during GIMPLE pass: slp
pickrst_avx2.c.c: In function 'acc_stat_win7_one_line_avx2':
pickrst_avx2.c.c:2:5: internal compiler error: in ix86_widen_mult_cost, at
config/i386/i386.cc:20444
    2 | int acc_stat_win7_one_line_avx2(int M_int[][0]) {
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
0x1b27814 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char
const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x1b28677 internal_error(char const*, ...)
        ???:0
0x6ea7cc fancy_abort(char const*, int, char const*)
        ???:0
0x6d377f ix86_vector_costs::add_stmt_cost(int, vect_cost_for_stmt,
_stmt_vec_info*, _slp_tree*, tree_node*, int, vect_cost_model_location) [clone
.cold]
        ???:0
0xf17c8a vect_bb_vectorization_profitable_p(_bb_vec_info*, vec<_slp_instance*,
va_heap, vl_ptr>, loop*)
        ???:0
0xf1c316 vect_slp_region(vec<basic_block_def*, va_heap, vl_ptr>,
vec<data_reference*, va_heap, vl_ptr>, vec<int, va_heap, vl_ptr>*, unsigned
int, loop*)
        ???:0
0xf1d04b vect_slp_bbs(vec<basic_block_def*, va_heap, vl_ptr> const&, loop*)
        ???:0
0xf1d340 vect_slp_function(function*)
        ???:0
0xf24ec9 (anonymous namespace)::pass_slp_vectorize::execute(function*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ gcc -v |& unnix
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-14.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-14.0.0/libexec/gcc/x86_64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 99999999 (experimental) (GCC)

Reply via email to