[Bug target/92658] x86 lacks vector extend / truncate
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Mar 2 07:52:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658
--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 28 Feb 2020, ubizjak at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92658
>
> --- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
> Richi, should the following test also vectorize?
In priciple yes. I see both cases "vectorized" to a store
from a CTOR but then my primitive pattern matching in forwprop
not applying because supportable_convert_operation is confused
about a vector(4) char type having SImode and bailing out at the
292 if (!VECTOR_MODE_P (m1) || !VECTOR_MODE_P (m2))
293 return false;
check. So it looks like with just SSE2 the backend doesn't
consider V4QImode a supported vector type. I'm not sure we
want to fix that but then this means regular optab checks
won't do it here.
Interesting cases nevertheless.
Would those conversions map to good assembly?
> --cut here--
> typedef unsigned char v16qi __attribute__((vector_size (16)));
> typedef unsigned int v4si __attribute__((vector_size (16)));
>
> void
> foo_u8_u32 (v4si * dst, v16qi * __restrict src)
> {
> unsigned int tem[4];
> tem[0] = (*src)[0];
> tem[1] = (*src)[1];
> tem[2] = (*src)[2];
> tem[3] = (*src)[3];
> dst[0] = *(v4si *) tem;
> }
>
> void
> bar_u8_u32 (v4si * dst, v16qi src)
> {
> unsigned int tem[4];
> tem[0] = src[0];
> tem[1] = src[1];
> tem[2] = src[2];
> tem[3] = src[3];
> dst[0] = *(v4si *) tem;
> }
> --cut here--
More information about the Gcc-bugs
mailing list