https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127382

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #10)
> 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.

Yes, we deal with bit-precision vs. others with patterns, the vectorizable_*
itself have to bail on these.  Iff there is appropriate extension the
pattern would use a VIEW_CONVERT and no normalization.

I'm not sure we want to take full advantage of the target specific padding
encoding, do we?  Is that also guaranteed for in-memory _BitInt?  Or
does RTL expansion of _BitInt loads normalize the register values
appropriately?
Because that's not going to fire for vector loads.

Reply via email to