https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120137
Bug ID: 120137
Summary: [16 regression] RISC-V: ICE during RTL pass:
vect_permconst
Product: gcc
Version: 16.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 61343
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61343&action=edit
freport-bug output
testcase:
char b[13][13];
void c() {
for (int d = 0; d < 13; ++d)
for (int e = 0; e < 13; ++e)
b[d][e] = e == 0 ? -98 : 38;
}
Command/backtrace:
$
/scratch/ewlu/daily-upstream-build/build-gcv/bin/riscv64-unknown-linux-gnu-gcc
-I/scratch/ewlu/ci/compiler-fuzz-ci/csmith-build/include -fsigned-char
-fno-strict-aliasing -fwrapv -march=rv64gcv_zvl256b -O3 -mrvv-vector-bits=zvl
red.c -o rv64gcv.out -w -freport-bug
during RTL pass: vect_permconst
red.c: In function 'c':
red.c:7:1: internal compiler error: in decompose, at rtl.h:2312
7 | }
| ^
0x313c6c6 internal_error(char const*, ...)
../../../gcc/gcc/diagnostic-global-context.cc:517
0xcecbc9 fancy_abort(char const*, int, char const*)
../../../gcc/gcc/diagnostic.cc:1807
0x13ea85f wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*,
unsigned int, std::pair<rtx_def*, machine_mode> const&)
../../../gcc/gcc/rtl.h:2312
0x13ea85f wide_int_ref_storage<false,
false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
../../../gcc/gcc/wide-int.h:1089
0x13ea85f generic_wide_int<wide_int_ref_storage<false, false>
>::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
../../../gcc/gcc/wide-int.h:847
0x13ea85f poly_int<2u, generic_wide_int<wide_int_ref_storage<false, false> >
>::poly_int<std::pair<rtx_def*, machine_mode>>(poly_int_hungry,
std::pair<rtx_def*, machine_mode> const&)
../../../gcc/gcc/poly-int.h:464
0x13ea85f poly_int<2u, generic_wide_int<wide_int_ref_storage<false, false> >
>::poly_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
../../../gcc/gcc/poly-int.h:457
0x13ea85f wi::to_poly_wide(rtx_def const*, machine_mode)
../../../gcc/gcc/rtl.h:2397
0x13e9da1 rtx_vector_builder::step(rtx_def*, rtx_def*) const
../../../gcc/gcc/rtx-vector-builder.h:122
0x13eac33 vector_builder<rtx_def*, machine_mode,
rtx_vector_builder>::stepped_sequence_p(unsigned int, unsigned int, unsigned
int)
../../../gcc/gcc/vector-builder.h:441
0x13eae5e vector_builder<rtx_def*, machine_mode,
rtx_vector_builder>::try_npatterns(unsigned int)
../../../gcc/gcc/vector-builder.h:494
0x13eb086 vector_builder<rtx_def*, machine_mode,
rtx_vector_builder>::finalize()
../../../gcc/gcc/vector-builder.h:582
0x13ea642 rtx_vector_builder::build(rtvec_def*)
../../../gcc/gcc/rtx-vector-builder.cc:33
0xfbf77c gen_rtx_CONST_VECTOR(machine_mode, rtvec_def*)
../../../gcc/gcc/emit-rtl.cc:6224
0x19918f0 vector_permconst::process_bb(basic_block_def*)
../../../gcc/gcc/config/riscv/riscv-vect-permconst.cc:217
0x1991b0a vector_permconst::execute(function*)
../../../gcc/gcc/config/riscv/riscv-vect-permconst.cc:291
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.
Preprocessed source stored into /tmp/ccRYe0Ri.out file, please attach this to
your bugreport.
godbolt: https://godbolt.org/z/jM9YrP6hn
Found via fuzzer