> -----Original Message----- > From: Andrea Corallo <andrea.cora...@arm.com> > Sent: Thursday, November 17, 2022 4:38 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 20/35] arm: improve tests for vfmasq_m* > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/mve/intrinsics/vfmasq_m_n_f16.c: Improve test. > * gcc.target/arm/mve/intrinsics/vfmasq_m_n_f32.c: Likewise. Ok. Thanks, Kyrill > --- > .../arm/mve/intrinsics/vfmasq_m_n_f16.c | 50 ++++++++++++++++--- > .../arm/mve/intrinsics/vfmasq_m_n_f32.c | 50 ++++++++++++++++--- > 2 files changed, 84 insertions(+), 16 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f16.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f16.c > index 06d2d114e46..03b376c9bbe 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f16.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f16.c > @@ -1,23 +1,57 @@ > /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > /* { dg-add-options arm_v8_1m_mve_fp } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +/* > +**foo: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vfmast.f16 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +*/ > float16x8_t > -foo (float16x8_t a, float16x8_t b, float16_t c, mve_pred16_t p) > +foo (float16x8_t m1, float16x8_t m2, float16_t add, mve_pred16_t p) > { > - return vfmasq_m_n_f16 (a, b, c, p); > + return vfmasq_m_n_f16 (m1, m2, add, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vfmast.f16" } } */ > > +/* > +**foo1: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vfmast.f16 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +*/ > float16x8_t > -foo1 (float16x8_t a, float16x8_t b, float16_t c, mve_pred16_t p) > +foo1 (float16x8_t m1, float16x8_t m2, float16_t add, mve_pred16_t p) > { > - return vfmasq_m (a, b, c, p); > + return vfmasq_m (m1, m2, add, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vfmast.f16" } } */ > +/* > +**foo2: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vfmast.f16 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +*/ > +float16x8_t > +foo2 (float16x8_t m1, float16x8_t m2, mve_pred16_t p) > +{ > + return vfmasq_m (m1, m2, 1.1, p); > +} > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f32.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f32.c > index bf1773d0eeb..ecf30ba9826 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f32.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f32.c > @@ -1,23 +1,57 @@ > /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > /* { dg-add-options arm_v8_1m_mve_fp } */ > /* { dg-additional-options "-O2" } */ > +/* { dg-final { check-function-bodies "**" "" } } */ > > #include "arm_mve.h" > > +/* > +**foo: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vfmast.f32 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +*/ > float32x4_t > -foo (float32x4_t a, float32x4_t b, float32_t c, mve_pred16_t p) > +foo (float32x4_t m1, float32x4_t m2, float32_t add, mve_pred16_t p) > { > - return vfmasq_m_n_f32 (a, b, c, p); > + return vfmasq_m_n_f32 (m1, m2, add, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vfmast.f32" } } */ > > +/* > +**foo1: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vfmast.f32 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +*/ > float32x4_t > -foo1 (float32x4_t a, float32x4_t b, float32_t c, mve_pred16_t p) > +foo1 (float32x4_t m1, float32x4_t m2, float32_t add, mve_pred16_t p) > { > - return vfmasq_m (a, b, c, p); > + return vfmasq_m (m1, m2, add, p); > } > > -/* { dg-final { scan-assembler "vpst" } } */ > -/* { dg-final { scan-assembler "vfmast.f32" } } */ > +/* > +**foo2: > +** ... > +** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +** vpst(?: @.*|) > +** ... > +** vfmast.f32 q[0-9]+, q[0-9]+, (?:ip|fp|r[0-9]+)(?: @.*|) > +** ... > +*/ > +float32x4_t > +foo2 (float32x4_t m1, float32x4_t m2, mve_pred16_t p) > +{ > + return vfmasq_m (m1, m2, 1.1, p); > +} > + > +/* { dg-final { scan-assembler-not "__ARM_undef" } } */ > \ No newline at end of file > -- > 2.25.1
RE: [PATCH 20/35] arm: improve tests for vfmasq_m*
Kyrylo Tkachov via Gcc-patches Tue, 22 Nov 2022 08:53:52 -0800
- [PATCH 10/35] arm: improve tests for vabav... Andrea Corallo via Gcc-patches
- RE: [PATCH 10/35] arm: improve tests ... Kyrylo Tkachov via Gcc-patches
- Re: [PATCH 10/35] arm: improve te... Andrea Corallo via Gcc-patches
- [PATCH 05/35] arm: improve vidupq* tests Andrea Corallo via Gcc-patches
- RE: [PATCH 05/35] arm: improve vidupq... Kyrylo Tkachov via Gcc-patches
- [PATCH 06/35] arm: improve tests and fix v... Andrea Corallo via Gcc-patches
- RE: [PATCH 06/35] arm: improve tests ... Kyrylo Tkachov via Gcc-patches
- [PATCH 35/35] arm: improve tests for vsetq... Andrea Corallo via Gcc-patches
- [PATCH 31/35] arm: improve tests for vqrdm... Andrea Corallo via Gcc-patches
- [PATCH 20/35] arm: improve tests for vfmas... Andrea Corallo via Gcc-patches
- RE: [PATCH 20/35] arm: improve tests ... Kyrylo Tkachov via Gcc-patches
- [PATCH 12/35] arm: improve tests and fix v... Andrea Corallo via Gcc-patches
- RE: [PATCH 12/35] arm: improve tests ... Kyrylo Tkachov via Gcc-patches
- [PATCH 11/35] arm: improve tests for vabdq... Andrea Corallo via Gcc-patches
- RE: [PATCH 11/35] arm: improve tests ... Kyrylo Tkachov via Gcc-patches
- [PATCH 16/35] arm: Add integer vector over... Andrea Corallo via Gcc-patches
- Re: [PATCH 16/35] arm: Add integer ve... Christophe Lyon via Gcc-patches
- Re: [PATCH 16/35] arm: Add intege... Andrea Corallo via Gcc-patches
- RE: [PATCH 16/35] arm: Add integer ve... Kyrylo Tkachov via Gcc-patches
- [PATCH 27/35] arm: improve tests for vqadd... Andrea Corallo via Gcc-patches
- RE: [PATCH 27/35] arm: improve tests ... Kyrylo Tkachov via Gcc-patches