https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127382
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
void
foo (long *a, _BitInt(17) *b)
{
for (int i = 0; i != 100; i++)
a[i] = b[i];
}
I'd say tree-vect-patterns.cc should pattern match this into
MEM_REF<unsigned short>(&a[i]) = (unsigned short) ((MEM_REF<short>(&b[i]) <<
15) >> 15);
on bitint_ext_undef targets and on bitint_ext_full to something similar on the
lhs instead (well, in this particular case more less the same thing, but if you
add there a[i] = b[i] + 1; it will be different. Anyway, guess it is similar
to the bool promotions that it should change all operations to the mode
precision type rather than just extend loads resp. stores.