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

            Bug ID: 116822
           Summary: [15 regression] RISC-V: ICE in compute_nregs_for_mode,
                    at config/riscv/riscv-vector-costs.cc
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ewlu at rivosinc dot com
  Target Milestone: ---

Created attachment 59184
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59184&action=edit
unreduced preprocessed testcase

Postcommit is seeing the following errors:
FAIL: gcc.target/riscv/rvv/autovec/binop/shift-run.c (internal compiler error:
in compute_nregs_for_mode, at config/riscv/riscv-vector-costs.cc:457)
FAIL: gcc.target/riscv/rvv/autovec/binop/shift-run.c (test for excess errors)

https://github.com/patrick-rivos/gcc-postcommit-ci/issues/1780

Ran local build on r15-3813-g0121b852c85 and it is still ICEs

ewlu@ewlu:/scratch/ewlu/ci/triage/baseline/build-ice$
./build-gcc-linux-stage2/gcc/xgcc -B./build-gcc-linux-stage2/gcc/ ./testcase.c
-march=rv32gcv -mabi=ilp32d -mcmodel=medlow -fdiagnostics-plain-output
-ftree-vectorize -O3 -mrvv-max-lmul=dynamic -std=c99 -fno-vect-cost-model
-mrvv-vector-bits=zvl -lm -o ./shift-run.exe -freport-bug
during GIMPLE pass: vect
./testcase.c: In function 'main':
./testcase.c:134:5: internal compiler error: in compute_nregs_for_mode, at
config/riscv/riscv-vector-costs.cc:457
0x2e979e5 internal_error(char const*, ...)
        ../../../gcc/gcc/diagnostic-global-context.cc:517
0xc996ba fancy_abort(char const*, int, char const*)
        ../../../gcc/gcc/diagnostic.cc:1512
0xbd0430 compute_nregs_for_mode
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:457
0xbd0430 max_number_of_live_regs
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:496
0xbd0430 has_unexpected_spills_p
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:845
0x18e9cc6
riscv_vector::costs::record_potential_unexpected_spills(_loop_vec_info*)
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:909
0x18e9cc6
riscv_vector::costs::record_potential_unexpected_spills(_loop_vec_info*)
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:897
0x18ea3ba riscv_vector::costs::analyze_loop_vinfo(_loop_vec_info*)
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:891
0x18ea3ba riscv_vector::costs::add_stmt_cost(int, vect_cost_for_stmt,
_stmt_vec_info*, _slp_tree*, tree_node*, int, vect_cost_model_location)
        ../../../gcc/gcc/config/riscv/riscv-vector-costs.cc:1234
0x1719c72 add_stmt_cost(vector_costs*, int, vect_cost_for_stmt,
_stmt_vec_info*, _slp_tree*, tree_node*, int, vect_cost_model_location)
        ../../../gcc/gcc/tree-vectorizer.h:1901
0x1719c72 add_stmt_costs(vector_costs*, vec<stmt_info_for_cost, va_heap,
vl_ptr>*)
        ../../../gcc/gcc/tree-vectorizer.h:1948
0x1719c72 vect_slp_analyze_operations(vec_info*)
        ../../../gcc/gcc/tree-vect-slp.cc:8016
0x16e023d vect_analyze_loop_2
        ../../../gcc/gcc/tree-vect-loop.cc:2958
0x16e21c3 vect_analyze_loop_1
        ../../../gcc/gcc/tree-vect-loop.cc:3431
0x16e2959 vect_analyze_loop(loop*, vec_info_shared*)
        ../../../gcc/gcc/tree-vect-loop.cc:3589
0x172fba4 try_vectorize_loop_1
        ../../../gcc/gcc/tree-vectorizer.cc:1070
0x172fba4 try_vectorize_loop
        ../../../gcc/gcc/tree-vectorizer.cc:1186
0x17304cc execute
        ../../../gcc/gcc/tree-vectorizer.cc:1302
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

unreduced preprocessed testcase included

Reply via email to