https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128056
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> (In reply to Richard Biener from comment #2)
> > So we have vector(16) bool as rtype but of course vectype is vector(32)
> > unsigned char. We take that from the simdclone fndecl, it isn't part of the
> > simdclone
> > info apparently.
> >
> > Can we change the simdclone fndecl return type to not use a _Bool component
> > type ? Is it supposed to return a vector mask, aka -1 vs 0 elements?
>
> On x86, the ABI doesn't say, it has only {,un}signed
> {char,short,int,long,long long}, pointers and {float,double} cases in its
> tables, except the mask parameter is documented to be characteristic data
> type with 0 and all ones bit patterns on pre-AVX512 and on AVX512 GPR 1 bit
> per bool.
> So, I assume yes, it is actually returning or accepting unsigned char or
> something like that instead with 0 and all ones bit patterns.
> What do other targets do is unknown, but because they've likely copied and
> modified it from the Intel ABI, most likely it is similar.
> Would be useful to see what ICC and/or clang does.
Indeed. I'm mostly raising this because vector types with BOOLEAN_TYPE
component (or POINTER_TYPE component) are not a thing and we should probably
reject those in the type verifier. BOOLEAN_TYPE vectors are solely used for
masks, so unless this is a mask (but it then should have a singed bool
component type) the return type should use an integer type component vector.
Similar
for enum, if that would ever be OMP declare SIMD-able.