-
Notifications
You must be signed in to change notification settings - Fork 136
Compiler bugs
Naoki Shibata edited this page Feb 22, 2021
·
2 revisions
These are part of compiler bugs I found.
-
float128 argument not passed with va_arg https://bugs.llvm.org/show_bug.cgi?id=47665
-
Inconsistent vector length used in autovectorizer for AVX-512 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99100
-
Compilation of the following code does not finish with clang version 9.0.0-2~ubuntu18.04.2. This is fixed in clang-10, and not reported.
// clang-9 -O -mavx512f clang9bug.c -S
#include <x86intrin.h>
typedef struct { __m512i x, y; } vmask2;
static __m512i vcast_vm_i_i(int i0, int i1) {
return _mm512_set_epi32(i0, i1, i0, i1, i0, i1, i0, i1, i0, i1, i0, i1, i0, i1, i0, i1);
}
__mmask16 bug(vmask2 a, vmask2 b) {
b.x = _mm512_add_epi64(_mm512_xor_si512(b.x, vcast_vm_i_i(0xffffffff, 0xffffffff)), vcast_vm_i_i(0, 1));
b.y = _mm512_add_epi64(b.y, _mm512_mask_and_epi64(_mm512_set1_epi32(0), _mm512_cmp_epi64_mask(b.x, vcast_vm_i_i(0, 0), _MM_CMPINT_EQ), vcast_vm_i_i(0, 1), vcast_vm_i_i(0, 1)));
return _mm512_kand(_mm512_cmp_epi64_mask(b.y, a.y, _MM_CMPINT_EQ), _mm512_cmp_epi64_mask(b.x, a.x, _MM_CMPINT_EQ));
}
- The following source code generates an internal compiler error with gcc-4.8. This is fixed in gcc-5, and not reported.
typedef long double vlongdouble __attribute__((vector_size(sizeof(long double)*2)));
vlongdouble vcast_vl_l(long double d) { return (vlongdouble) { d, d }; }
int main() {
vlongdouble vld = vcast_vl_l(0);
}