https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95528
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |rsandifo at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Adjusted testcase so that there are no warnings:
template <typename a> struct b {
typedef a c __attribute__((vector_size(sizeof(a) * 4)));
union {
c d;
struct {
a e, f, g, h;
};
};
b();
b(const b &i) : d(i.d) {}
static b j(c);
template <typename k> operator b<k>() {
b<k>::j(typename b<k>::c{k(e), k(f), k(g), k(h)});
return b<k>();
}
};
template <typename a> using l = b<a>;
using m = l<char>;
using n = l<short>;
m o(n i) { return i; }
b<short> q;
void p() { o(q); }
What vec_pack_trunc_si does looks completely reasonable for the vector bool
types that have integral modes (i.e. AVX512F+ masks).
I'd say the vectorizer/simplify_vector_constructor just shouldn't attempt to
use these (e.g. vec_pack*, vec_unpack* optabs) for !VEC_MODE_P unless it is
VECTOR_BOOLEAN_TYPE_P type.
For i386 it would be the right thing as the patterns really assume that it is
vector booleans and have their properties.
Though, aarch64 seems to have vec_pack_trunc_di and vec_pack_trunc_df
expanders, it is unclear to me what they are for and if they are really used.
Other targets seem to only define these for vector modes.