> -----Original Message----- > From: Andrea Corallo <andrea.cora...@arm.com> > Sent: Friday, January 20, 2023 4:40 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov <kyrylo.tkac...@arm.com>; Richard Earnshaw > <richard.earns...@arm.com>; Andrea Corallo <andrea.cora...@arm.com> > Subject: [PATCH 10/23] arm: improve tests and fix vqabsq* > > gcc/ChangeLog: > > * config/arm/mve.md (mve_vqabsq_s<mode>): Fix spacing. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/mve/intrinsics/vqabsq_m_s16.c: Improve test. > * gcc.target/arm/mve/intrinsics/vqabsq_m_s32.c: Likewise. > * gcc.target/arm/mve/intrinsics/vqabsq_m_s8.c: Likewise. > * gcc.target/arm/mve/intrinsics/vqabsq_s16.c: Likewise. > * gcc.target/arm/mve/intrinsics/vqabsq_s32.c: Likewise. > * gcc.target/arm/mve/intrinsics/vqabsq_s8.c: Likewise. Ok. Thanks, Kyrill > --- > gcc/config/arm/mve.md | 2 +- > .../arm/mve/intrinsics/vqabsq_m_s16.c | 33 +++++++++++++++++-- > .../arm/mve/intrinsics/vqabsq_m_s32.c | 33 +++++++++++++++++-- > .../arm/mve/intrinsics/vqabsq_m_s8.c | 33 +++++++++++++++++-- > .../arm/mve/intrinsics/vqabsq_s16.c | 28 +++++++++++++--- > .../arm/mve/intrinsics/vqabsq_s32.c | 28 +++++++++++++--- > .../gcc.target/arm/mve/intrinsics/vqabsq_s8.c | 24 ++++++++++++-- > 7 files changed, 161 insertions(+), 20 deletions(-) > > diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md > index 0a243486bdb..600adf7d69b 100644 > --- a/gcc/config/arm/mve.md > +++ b/gcc/config/arm/mve.md > @@ -388,7 +388,7 @@ (define_insn "mve_vqabsq_s<mode>" > VQABSQ_S)) > ] > "TARGET_HAVE_MVE" > - "vqabs.s%#<V_sz_elem> %q0, %q1" > + "vqabs.s%#<V_sz_elem>\t%q0, %q1" > [(set_attr "type" "mve_move") > ]) > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s16.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s16.c > index e74e04ac92f..7172ac5cddd 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s16.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s16.c > @@ -1,22 +1,49 @@ > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > /* { dg-add-options arm_v8_1m_mve } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/* > +**foo: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vqabst.s16 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int16x8_t > foo (int16x8_t inactive, int16x8_t a, mve_pred16_t p) > { > return vqabsq_m_s16 (inactive, a, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vqabst.s16" } } */ > > +/* > +**foo1: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vqabst.s16 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int16x8_t > foo1 (int16x8_t inactive, int16x8_t a, mve_pred16_t p) > { > return vqabsq_m (inactive, a, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > +#ifdef __cplusplus > +} > +#endif > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s32.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s32.c > index f6ca8a6c3d6..297cb196f1a 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s32.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s32.c > @@ -1,22 +1,49 @@ > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > /* { dg-add-options arm_v8_1m_mve } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/* > +**foo: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vqabst.s32 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int32x4_t > foo (int32x4_t inactive, int32x4_t a, mve_pred16_t p) > { > return vqabsq_m_s32 (inactive, a, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vqabst.s32" } } */ > > +/* > +**foo1: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vqabst.s32 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int32x4_t > foo1 (int32x4_t inactive, int32x4_t a, mve_pred16_t p) > { > return vqabsq_m (inactive, a, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > +#ifdef __cplusplus > +} > +#endif > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s8.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s8.c > index d89a5aa3fa5..83c69931239 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s8.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_m_s8.c > @@ -1,22 +1,49 @@ > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > /* { dg-add-options arm_v8_1m_mve } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/* > +**foo: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vqabst.s8 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int8x16_t > foo (int8x16_t inactive, int8x16_t a, mve_pred16_t p) > { > return vqabsq_m_s8 (inactive, a, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vqabst.s8" } } */ > > +/* > +**foo1: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vqabst.s8 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int8x16_t > foo1 (int8x16_t inactive, int8x16_t a, mve_pred16_t p) > { > return vqabsq_m (inactive, a, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > +#ifdef __cplusplus > +} > +#endif > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s16.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s16.c > index e67c008cf6e..bf849fe9354 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s16.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s16.c > @@ -1,21 +1,41 @@ > -/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > -/* { dg-add-options arm_v8_1m_mve_fp } */ > +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ > +/* { dg-add-options arm_v8_1m_mve } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/* > +**foo: > +** ... > +** vqabs.s16 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int16x8_t > foo (int16x8_t a) > { > return vqabsq_s16 (a); > } > > -/* { dg-final { scan-assembler "vqabs.s16" } } */ > > +/* > +**foo1: > +** ... > +** vqabs.s16 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int16x8_t > foo1 (int16x8_t a) > { > return vqabsq (a); > } > > -/* { dg-final { scan-assembler "vqabs.s16" } } */ > +#ifdef __cplusplus > +} > +#endif > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s32.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s32.c > index 8023ff8d22e..1f88821de23 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s32.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s32.c > @@ -1,21 +1,41 @@ > -/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > -/* { dg-add-options arm_v8_1m_mve_fp } */ > +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ > +/* { dg-add-options arm_v8_1m_mve } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/* > +**foo: > +** ... > +** vqabs.s32 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int32x4_t > foo (int32x4_t a) > { > return vqabsq_s32 (a); > } > > -/* { dg-final { scan-assembler "vqabs.s32" } } */ > > +/* > +**foo1: > +** ... > +** vqabs.s32 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int32x4_t > foo1 (int32x4_t a) > { > return vqabsq (a); > } > > -/* { dg-final { scan-assembler "vqabs.s32" } } */ > +#ifdef __cplusplus > +} > +#endif > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s8.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s8.c > index b36d2b762e9..1399f7c1636 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s8.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vqabsq_s8.c > @@ -1,21 +1,41 @@ > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > /* { dg-add-options arm_v8_1m_mve } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/* > +**foo: > +** ... > +** vqabs.s8 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int8x16_t > foo (int8x16_t a) > { > return vqabsq_s8 (a); > } > > -/* { dg-final { scan-assembler "vqabs.s8" } } */ > > +/* > +**foo1: > +** ... > +** vqabs.s8 q[0-9]+, q[0-9]+(?: @.*|) > +** ... > +*/ > int8x16_t > foo1 (int8x16_t a) > { > return vqabsq (a); > } > > -/* { dg-final { scan-assembler "vqabs.s8" } } */ > +#ifdef __cplusplus > +} > +#endif > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > -- > 2.25.1
RE: [PATCH 10/23] arm: improve tests and fix vqabsq*
Kyrylo Tkachov via Gcc-patches Fri, 20 Jan 2023 10:01:43 -0800
- RE: [PATCH 02/23] arm: improve tests a... Kyrylo Tkachov via Gcc-patches
- [PATCH 08/23] arm: improve tests for vcmlaq... Andrea Corallo via Gcc-patches
- RE: [PATCH 08/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 11/23] arm: improve tests for vqdmla... Andrea Corallo via Gcc-patches
- RE: [PATCH 11/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 19/23] arm: improve tests for vqrdml... Andrea Corallo via Gcc-patches
- RE: [PATCH 19/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 22/23] arm: improve tests for vld2q* Andrea Corallo via Gcc-patches
- RE: [PATCH 22/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 10/23] arm: improve tests and fix vq... Andrea Corallo via Gcc-patches
- RE: [PATCH 10/23] arm: improve tests a... Kyrylo Tkachov via Gcc-patches
- [PATCH 07/23] arm: improve tests for vcaddq... Andrea Corallo via Gcc-patches
- RE: [PATCH 07/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 20/23] arm: improve tests for vqrdmu... Andrea Corallo via Gcc-patches
- RE: [PATCH 20/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 14/23] arm: improve tests for vqrdml... Andrea Corallo via Gcc-patches
- RE: [PATCH 14/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 09/23] arm: improve tests for vcmulq... Andrea Corallo via Gcc-patches
- RE: [PATCH 09/23] arm: improve tests f... Kyrylo Tkachov via Gcc-patches
- [PATCH 23/23] arm: fix missing extern "... Andrea Corallo via Gcc-patches
- RE: [PATCH 23/23] arm: fix missing ext... Kyrylo Tkachov via Gcc-patches