https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100761
Bug ID: 100761
Summary: [mips+msa] ICE when using __builtin_convertvector to
convert from u8x8 to u8x16
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
I'm seeing an ICE from MIPS with MSA enabled when attempting to use
__builtin_convertvector to convert a vector of 8 unsigned 8-bit integers to 8
unsigned 16-bit integers.
Here is a reduced test case, courtesy of C-Reduce:
typedef char a;
typedef short b;
typedef struct {
a c __attribute__((__vector_size__(8)));
} d;
d e;
void f() {
b g __attribute__((__vector_size__(16))) (
__builtin_convertvector(e.c, __typeof__(g)));
}
$ mips64el-linux-gnuabi64-g++-10 -march=loongson3a -mmsa -c -o test.o test.c
during RTL pass: expand
test.c: In function 'void f()':
test.c:8:5: internal compiler error: in mips_expand_vec_unpack, at
config/mips/mips.c:21757
8 | b g __attribute__((__vector_size__(16))) (
| ^
0x7fed0d1f9d09 __libc_start_main
../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
This is with GCC 10.2.1-6 from Debian:
$ mips64el-linux-gnuabi64-g++-10 --version
mips64el-linux-gnuabi64-g++-10 (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Original code is at
https://github.com/simd-everywhere/simde/blob/7d0e2aca9458f760d7196b94bfdcf83b2178ea24/simde/x86/sse.h#L1046,
SIMDE_CONVERT_VECTOR_ is defined at
https://github.com/simd-everywhere/simde/blob/7d0e2aca9458f760d7196b94bfdcf83b2178ea24/simde/simde-common.h#L292-L296