[PATCH v2] x86-64: Add test-vector-abi.h/test-vector-abi-sincos.h

Sunil Pandey skpgkp2@gmail.com
Thu Oct 14 16:36:01 GMT 2021


On Thu, Oct 14, 2021 at 9:13 AM Noah Goldstein via Libc-alpha <
libc-alpha@sourceware.org> wrote:

> On Thu, Oct 14, 2021 at 8:32 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Wed, Oct 13, 2021 at 9:23 PM Noah Goldstein <goldstein.w.n@gmail.com>
> wrote:
> > >
> > > On Wed, Oct 13, 2021 at 11:54 PM H.J. Lu via Libc-alpha
> > > <libc-alpha@sourceware.org> wrote:
> > > >
> > > > Add a template for vector ABI test and use it for vector
> sincos/sincosf
> > > > ABI tests.
> > > > ---
> > > >  sysdeps/x86_64/fpu/Makefile                   |  6 ---
> > > >  .../fpu/test-double-libmvec-sincos-avx.c      |  1 +
> > > >  .../fpu/test-double-libmvec-sincos-avx2.c     |  3 +-
> > > >  .../fpu/test-double-libmvec-sincos-avx512.c   |  3 +-
> > > >  .../fpu/test-double-libmvec-sincos-main.c     |  2 +-
> > > >  .../x86_64/fpu/test-double-libmvec-sincos.c   | 45
> +------------------
> > > >  .../fpu/test-float-libmvec-sincosf-avx.c      |  3 +-
> > > >  .../fpu/test-float-libmvec-sincosf-avx2.c     |  3 +-
> > > >  .../fpu/test-float-libmvec-sincosf-avx512.c   |  3 +-
> > > >  .../fpu/test-float-libmvec-sincosf-main.c     |  2 +-
> > > >  .../x86_64/fpu/test-float-libmvec-sincosf.c   | 45
> +------------------
> > > >  sysdeps/x86_64/fpu/test-vector-abi.h          | 41 +++++++++++++++++
> > > >  12 files changed, 56 insertions(+), 101 deletions(-)
> > > >  create mode 100644 sysdeps/x86_64/fpu/test-vector-abi.h
> > > >
> > > > diff --git a/sysdeps/x86_64/fpu/Makefile
> b/sysdeps/x86_64/fpu/Makefile
> > > > index 1b4406380d..6643f77c5d 100644
> > > > --- a/sysdeps/x86_64/fpu/Makefile
> > > > +++ b/sysdeps/x86_64/fpu/Makefile
> > > > @@ -108,19 +108,13 @@ CFLAGS-test-double-vlen4-avx2-wrappers.c =
> $(double-vlen4-arch-ext2-cflags)
> > > >  CFLAGS-test-float-vlen8-avx2-wrappers.c =
> $(float-vlen8-arch-ext2-cflags)
> > > >
> > > >  CFLAGS-test-double-libmvec-sincos-main.c = $(libmvec-sincos-cflags)
> > > > -CFLAGS-test-double-libmvec-sincos-avx.c = -DREQUIRE_AVX
> > > >  CFLAGS-test-double-libmvec-sincos-avx-main.c =
> $(libmvec-sincos-cflags) $(double-vlen4-arch-ext-cflags)
> > > > -CFLAGS-test-double-libmvec-sincos-avx2.c = -DREQUIRE_AVX2
> > > >  CFLAGS-test-double-libmvec-sincos-avx2-main.c =
> $(libmvec-sincos-cflags) $(double-vlen4-arch-ext2-cflags)
> > > > -CFLAGS-test-double-libmvec-sincos-avx512.c = -DREQUIRE_AVX512F
> > > >  CFLAGS-test-double-libmvec-sincos-avx512-main.c =
> $(libmvec-sincos-cflags) $(double-vlen8-arch-ext-cflags)
> > > >
> > > >  CFLAGS-test-float-libmvec-sincosf-main.c = $(libmvec-sincos-cflags)
> > > > -CFLAGS-test-float-libmvec-sincosf-avx.c = -DREQUIRE_AVX
> > > >  CFLAGS-test-float-libmvec-sincosf-avx-main.c =
> $(libmvec-sincos-cflags) $(float-vlen8-arch-ext-cflags)
> > > > -CFLAGS-test-float-libmvec-sincosf-avx2.c = -DREQUIRE_AVX2
> > > >  CFLAGS-test-float-libmvec-sincosf-avx2-main.c =
> $(libmvec-sincos-cflags) $(float-vlen8-arch-ext2-cflags)
> > > > -CFLAGS-test-float-libmvec-sincosf-avx512.c = -DREQUIRE_AVX512F
> > > >  CFLAGS-test-float-libmvec-sincosf-avx512-main.c =
> $(libmvec-sincos-cflags) $(float-vlen16-arch-ext-cflags)
> > > >  endif
> > > >  endif
> > > > diff --git a/sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx.c
> b/sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx.c
> > > > index 896f1bcbaf..fbc0dbe3d9 100644
> > > > --- a/sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx.c
> > > > +++ b/sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx.c
> > > > @@ -1 +1,2 @@
> > > > +#define REQUIRE_AVX
> > > >  #include "test-double-libmvec-sincos.c"
> > >
> > > Should this be: #include "test-vector-abi.h"?
> >
> > Yes.
> >
> > > If so can test-double-libmvec-sincos.c be deleted?
> >
> > No.  We need it to build test-double-libmvec-sincos.
> >
> > Here is the v2 patch.  The main changes are
> >
> > 1. Rename all test-XXX-main.c files to test-XXX.c.
> > 2. Use test-libmvec*.c to run the libmvec ABI tests.
> >
> > OK for master?
>
> Should "mathvec/check-abi-libmvec'' be the only test in mathvec?
>
> If so then LGTM.
>
> >
> > Thanks.
> >
> > --
> > H.J.
>

v2 patch, file name looks inconsistent.

sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx512f.c
sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx512f.c
sysdeps/x86_64/fpu/test-libmvec-avx512f.c

Should  these file named as

sysdeps/x86_64/fpu/test-double-libmvec-sincos-avx512.c
sysdeps/x86_64/fpu/test-float-libmvec-sincosf-avx512.c
sysdeps/x86_64/fpu/test-libmvec-avx512.c


More information about the Libc-alpha mailing list