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

            Bug ID: 114749
           Summary: [14] RISC-V rv64gcv ICE: in vectorizable_load, at
                    tree-vect-stmts.cc
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Created attachment 57966
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57966&action=edit
-freport-bug output

Testcase:
extern int a[];
extern char b[];
int c = 24;
_Bool d[24][24][24];
_Bool (*e)[24][24] = d;
int main() {
  for (short f = 0; f < 24; f += 3)
    for (unsigned g = 0; g < (char)c; g += 2) {
      a[f] = 0;
      b[g] |= ({ e[f][f][f]; });
    }
}

Backtrace:
> /scratch/tc-testing/tc-apr-15/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc 
> -march=rv64gcv -fwhole-program -O3 -mrvv-vector-bits=zvl red.c -o red.out
during GIMPLE pass: vect
./red.c: In function 'main':
./red.c:6:5: internal compiler error: in vectorizable_load, at
tree-vect-stmts.cc:10239
    6 | int main() {
      |     ^~~~
0xbd26d1 vectorizable_load
        ../../../gcc/gcc/tree-vect-stmts.cc:10239
0x26dc7b7 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        ../../../gcc/gcc/tree-vect-stmts.cc:13274
0x15ec172 vect_analyze_loop_operations
        ../../../gcc/gcc/tree-vect-loop.cc:2208
0x15ec172 vect_analyze_loop_2
        ../../../gcc/gcc/tree-vect-loop.cc:3041
0x15ede80 vect_analyze_loop_1
        ../../../gcc/gcc/tree-vect-loop.cc:3481
0x15ee619 vect_analyze_loop(loop*, vec_info_shared*)
        ../../../gcc/gcc/tree-vect-loop.cc:3639
0x16362f4 try_vectorize_loop_1
        ../../../gcc/gcc/tree-vectorizer.cc:1066
0x16362f4 try_vectorize_loop
        ../../../gcc/gcc/tree-vectorizer.cc:1182
0x1636c1c execute
        ../../../gcc/gcc/tree-vectorizer.cc:1298
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.

Discovered/tested using r14-9976-gf8409c3109d (not bisected)

Found via fuzzer.

Reply via email to