diff options
author | Andrea Corallo <andrea.corallo@arm.com> | 2022-11-16 14:24:14 +0100 |
---|---|---|
committer | Andrea Corallo <andrea.corallo@arm.com> | 2022-11-28 10:09:21 +0100 |
commit | 253efaac2d5e97b09bc841d6f85ff908de5760df (patch) | |
tree | deb84f771abfa73f0a7194e9d919265643dcfae3 /gcc | |
parent | 9b8dc6379d600706d3ed790d3ef4c6b25678d289 (diff) | |
download | gcc-253efaac2d5e97b09bc841d6f85ff908de5760df.zip gcc-253efaac2d5e97b09bc841d6f85ff908de5760df.tar.gz gcc-253efaac2d5e97b09bc841d6f85ff908de5760df.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.target/arm/mve/intrinsics/vfmasq_m_n_f16.c | 50 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/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 06d2d11..03b376c 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 bf1773d..ecf30ba 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 |