Compiler Bugs - simd-everywhere/simde Wiki

SIMDe has proven to be rather good at finding compiler bugs.

It is generally possible for us to work around these issues, usually by using the preprocessor to choose a different code path. When we find bugs in the current versions of compilers we try to report them so they can be fixed; the GCC and Emscripten developers in particular have been very responsive and helpful.

Bugs We Can't Work Around

Unfortunately, sometimes working around a bug simply isn't feasible. What follows is a list of bugs we can't currently work around.

Clang

GCC

PGI

Bugs Discovered By SIMDe

As mentioned in the introduction, we seem to find a fair number of compiler bugs. What follows is an incomplete list of some of the issues we've found in compilers which have been fixed, and/or for which there is a work-around in SIMDe.

Compiler Bug Present In Fixed In Type Description
GCC 95227 Spurious warning vec_extract doesn't mark input as used in C++ mode
GCC 95239 Spurious warning Unable to ignore -Wattribute-warning in macro
GCC 95421 API missing / incorrect [AArch64] Missing NEON functions documented on ARM's web site
GCC 95471 API missing / incorrect [ARMv8] vrndvq_f32 defined even when not supported by ARMv8
GCC 95782 ICE [ppc64le] ICE in _cpp_pop_context
GCC 97016 API missing / incorrect _MM_CMPINT_ENUM type is missing
GCC 95483 11 API missing / incorrect [i386] Missing SIMD functions.
GCC 95399 API missing / incorrect [ARM] 32/64-bit vcvtnq_* functions are missing
GCC 96313 8.5 API missing / incorrect [AArch64] vqmovun* return types should be unsigned.
GCC 94482 8 / 9 8.5/9.4/10 Incorrect optimization [8/9 Regression] Inserting into vector with optimization enabled on x86 generates incorrect result.
GCC 93557 9.3/10.1 Spurious warning __builtin_convertvector doesn't mark input as used.
GCC 94385 9.4/10.1 ICE [10 Regression] Internal compiler error for __builtin_convertvector + statement expr. Latent bug in GCC 9.
GCC 94488 8.5/9.4/10.1 ICE [AArch64] ICE on right shift of V2DImode by DImode shift.
GCC 96174 9.4/10.2 API missing / incorrect AVX-512 functions missing when compiled without optimization.
GCC 98428 ICE ICE with omp simd loop + optimization
GCC 98521 10.2.1 10.3 API missing / incorrect [x86] _mm256_cmov_si256 XOP function is missing.
GCC 97248 ICE [mips] unrecognizable insn when left shifting uint64 vector by scalar with MSA
GCC 99754 12 API missing / incorrect [sse2] new _mm_loadu_si16 and _mm_loadu_si32 implemented incorrectly
GCC 100760 10.2 ICE [mips + msa] ICE: maximum number of generated reload insns per insn achieved
GCC 100761 10.2 ICE [mips+msa] ICE when using __builtin_convertvector to convert from u8x8 to u8x16
GCC 100762 10.2 ICE [mips+msa] ICE when comparing 64 bit vectors
GCC 100927 10.2 Incorrect optimization [sse2] floating point to integer conversion functions incorrect results w/ NaN constants + optimization
GCC 101714 Implementation incorrect [POWER] vec_min / vec_max handles NaN incorrectly when evaluated at compile time
Clang 45541 Incorrect optimization [AArch64] Incorrect result for vector conversion with -O2
Clang 45931 API missing / incorrect Many AVX-512 functions take an int instead of unsigned int. Fixed in clang 11.0.
Clang 45959 Spurious warning SIMD & reduction on signed types emits sign-conversion diagnostic
Clang 46770 API missing / incorrect [ppc] vec_sel variants missing
Clang 46844 12 (AArch64-only) Incorrect optimization [AArch64] incorrect results from vcvt* functions with negative inputs when optimization is enabled.
Clang 46840 12 API missing / incorrect [AArch64] vqmovun* return types should be unsigned.
Clang 32827 API missing / incorrect _mm_set_pd1 missing from emmintrin.h
Clang 44589 Spurious warning _mm_extract_pi16 and _mm_insert_pi16 warn with -Wvector-conversion. Fixed in clang 11.0
Clang 48257 Spurious warning vget_lane_p64 triggers -Wvector-conversion diagnostic
Clang 48673 API missing / incorrect [x86] _mm_frcz_ss and _mm_frcz_sd should take two parameters
Clang 48718 API missing / incorrect NEON scalar comparison functions should return unsigned values
Clang 49716 7+ ICE clang segfault at -O2 in C mode
Clang 50893 11.0 ICE Compiler error when converting from vector of 2x32 to 2x64-bit int on POWER7
Clang 50901 11.0 ICE [power7] error in backend: Cannot select v16i8 = PPCISD::SCALAR_TO_VECTOR_PERMUTED
Clang 50905 11.0 Perf slow code for absolute value of int8 x 16 vector on POWER9 at -O3
Clang 50932 API missing / incorrect [POWER] vec_bperm missing documented signatures
Clang 51992 14-dev 14-dev ICE Regression [VectorCombine] ScalarizationResult destructor assertion due to SafeWithFreeze and scalarizeLoadExtract
Emscripten 10425 ICE LLVM assertion failure when casting a SIMD type with -O3
Emscripten 11315 ICE Crash in WebAssembly Register Stackify with tot
Emscripten 11176 ICE "Not a vector MVT!" clang error with -s SIMD=1 on tot
Emscripten 10563 ICE emcc crashes with SIMD without optimization
Emscripten 10651 API missing / incorrect emscripten errors in wasm_simd128.h
Emscripten 14629 ICE UNREACHABLE executed at …/binaryen/src/wasm-interpreter.h:503!
ICC ??? Incorrect optimization ICC generates incorrect code for signed absolute difference
ICC ??? False advertisement of feature __builtin_expect_with_probability unsupported but __has_builtin claims otherwise
ICC ??? False advertisement of feature fallthrough attribute unsupported, contrary to icc's claims
ICC ??? ICE Internal error: 04010002_1671
NVC 30104 21.3 ICE ICE from % operator on vector extensions
NVC 30107 21.3 ICE Using _mm_cvtpd_epi32 results in compiler error
NVC 30106 21.3 API missing/incorrect Undefined reference to `__builtin_ia32_palignr256’ when calling _mm256_alignr_epi8

Note: some of the version number information may be incorrect or missing. Sorry, it's a recent addition to the table.