Open nemequ opened 7 years ago
I haven't really been reporting these lately since I can't log in to the PGI forum, but I should probably write them down somewhere… here is another one:
#include <mmintrin.h>
#include <stdint.h>
typedef union {
int8_t v[8];
__m64 mmx;
} not_m64;
static_assert(sizeof(not_m64) == sizeof(__m64));
static_assert(alignof(not_m64) == alignof(__m64));
__m64 add_raw_mmx(__m64 a, __m64 b) {
return _mm_add_pi8(a, b);
}
not_m64 add_mmx(not_m64 a, not_m64 b) {
not_m64 r;
r.mmx = _mm_add_pi8(a.mmx, b.mmx);
return r;
}
pgcc works pgc++ doesn't:
PGCC-F-0000-Internal compiler error. process_formal_arguments: Function argument with mismatched size that is neither integer nor floating-point 0 (df.cpp: 22)
PGCC/x86-64 Linux 19.10-0: compilation aborted
So PGI isn't going to work in C++ until #72 is done.
Another one: __STDC_HOSTED__
isn't defined. I think it should probably be defined to 1 since AFAICT PGI does meet all the requirements of a hosted implementation, but it definitely shouldn't be undefined.
Reduced version of the (an?) issue preventing PGI in C++ mode from compiling SIMDe:
#include <emmintrin.h>
typedef struct { __m64 mmx; } simde_int8x8_t;
int fn1(simde_int8x8_t p1) { return 0; }
nemequ@ubuntu:~$ pgc++ -o pgi-ice pgi-ice.cpp
PGCC-F-0000-Internal compiler error. process_formal_arguments: Function argument with mismatched size that is neither integer nor floating-point 0 (pgi-ice.cpp: 3)
PGCC/x86-64 Linux 19.10-0: compilation aborted
There are a decent number of issues in PGI we are currently working around in SIMDe, this is a meta-bug for tracking them. I've reported them to PGI, just waiting on fixes.
I'll try to keep this list updated as we add new functions.
General:
MMX:
_mm_cvtm64_si64
— function missing_mm_cvtsi64_m64
— function missing_mm_slli_pi16
— incorrect result_mm_slli_pi32
— incorrect result_mm_srli_pi16
— incorrect result_mm_srli_pi32
— incorrect result_mm_srli_pi64
— incorrect result_mm_srai_pi16
— incorrect result_mm_srai_pi32
— incorrect resultSSE:
_mm_cmpge_ss
— incorrect result_mm_cmpgt_ss
— incorrect result_mm_cmpnge_ss
— incorrect result_mm_cmpngt_ss
— incorrect result_mm_cmpunord_ss
— incorrect result_mm_cvtsi64_ss
— function missing (but the_mm_cvtsi64x_ss
alias exists)_mm_cvtss_si64
— function missing (but the_mm_cvtss_si64x
alias exists)_mm_cvttss_si64
— function missing (but the_mm_cvttss_si64x
alias exists)_mm_insert_pi16
— triggers infinite loop during compilation_mm_shuffle_pi16
— triggers infinite loop during compilation_mm_shuffle_ps
— triggers infinite loop during compilation_mm_undefined_ps
— function missingSSE2:
_mm_bslli_si128
— triggers infinite loop during compilation_mm_bsrli_si128
— triggers infinite loop during compilation_mm_cmpgt_sd
— incorrect result_mm_cmpge_sd
— incorrect result_mm_cmpnge_sd
— incorrect result_mm_cvtsd_f64
— incorrect result_mm_cvtsd_si64
— function missing (but the_mm_cvtsd_si64x
alias exists)_mm_cvtsi128_si64
— function missing (but the_mm_cvtsi128_si64x
alias exists)_mm_cvtsi64_sd
— function missing (but the_mm_cvtsi64_sdx
alias exists)_mm_cvtsi64_si128
— function missing (but the_mm_cvtsi64_si128x
alias exists)_mm_cvttsd_si64
— function missing (but the_mm_cvttsd_si64x
alias exists)_mm_insert_epi16
— triggers infinite loop during compilation_mm_mul_su32
— incorrect result, fixable_mm_mulhi_epu16
— incorrect result, fixable_mm_shuffle_pd
— triggers infinite loop during compilation_mm_undefined_pd
— function missing_mm_undefined_si128
— function missingAVX2:
_mm256_shufflelo_epi16
— ICESome of these functions (annotated above with "fixable") can be fixed with trivial changes to the headers in question.
Some other functions could probably be fixed like this, too, but I haven't checked them all.