On Wed, Jun 21, 2023 at 10:22 AM Richard Biener
<richard.guent...@gmail.com> wrote:

> > > +      /* For conversions between float and smaller integer types try 
> > > whether we
> > > +        can use intermediate signed integer types to support the
> > > +        conversion.  */
> >
> > I'm trying to enhance testcase coverage with explicit signed/unsigned
> > types (patch attached), and I have noticed that zero-extension is used
> > for unsigned types. So, the above comment that mentions only signed
> > integer types is not entirely correct.
>
> The comment says the intermediate sized vector types are always
> signed (because float conversions to/from unsigned are always somewhat
> awkward), but yes, if the original type was unsigned zero-extension is
> used and if it was signed sign-extension.
>
> The testcase adjustments / additions look good to me btw.

Thanks, pushed with the following ChangeLog:

vect: Add testcases for unsigned conversions [PR110018]

Also test conversions with unsigned types.

    PR target/110018

gcc/testsuite/ChangeLog:

    * gcc.target/i386/pr110018-1.c: Use explicit signed types.
    * gcc.target/i386/pr110018-2.c: New test.

Tested on x86_64-linux-gnu {,-m32}.

Uros.

Reply via email to