arm: improve tests for vqrdmladhq*

gcc/testsuite/ChangeLog:

	* gcc.target/arm/mve/intrinsics/vqrdmladhq_m_s16.c: Use
	check-function-bodies instead of scan-assembler checks.  Use
	extern "C" for C++ testing.
	* gcc.target/arm/mve/intrinsics/vqrdmladhq_m_s32.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vqrdmladhq_m_s8.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vqrdmladhq_s16.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vqrdmladhq_s32.c: Likewise.
	* gcc.target/arm/mve/intrinsics/vqrdmladhq_s8.c: Likewise.
This commit is contained in:
Andrea Corallo 2022-11-28 17:42:09 +01:00
parent f2a324b29e
commit 6c43db2480
6 changed files with 156 additions and 18 deletions

View file

@ -1,23 +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(?: @.*|)
** ...
** vqrdmladht.s16 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int16x8_t
foo (int16x8_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p)
{
return vqrdmladhq_m_s16 (inactive, a, b, p);
}
/* { dg-final { scan-assembler "vpst" } } */
/* { dg-final { scan-assembler "vqrdmladht.s16" } } */
/*
**foo1:
** ...
** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|)
** ...
** vpst(?: @.*|)
** ...
** vqrdmladht.s16 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int16x8_t
foo1 (int16x8_t inactive, int16x8_t a, int16x8_t b, mve_pred16_t p)
{
return vqrdmladhq_m (inactive, a, b, p);
}
/* { dg-final { scan-assembler "vpst" } } */
/* { dg-final { scan-assembler "vqrdmladht.s16" } } */
#ifdef __cplusplus
}
#endif
/* { dg-final { scan-assembler-not "__ARM_undef" } } */

View file

@ -1,23 +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(?: @.*|)
** ...
** vqrdmladht.s32 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int32x4_t
foo (int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
{
return vqrdmladhq_m_s32 (inactive, a, b, p);
}
/* { dg-final { scan-assembler "vpst" } } */
/* { dg-final { scan-assembler "vqrdmladht.s32" } } */
/*
**foo1:
** ...
** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|)
** ...
** vpst(?: @.*|)
** ...
** vqrdmladht.s32 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int32x4_t
foo1 (int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)
{
return vqrdmladhq_m (inactive, a, b, p);
}
/* { dg-final { scan-assembler "vpst" } } */
/* { dg-final { scan-assembler "vqrdmladht.s32" } } */
#ifdef __cplusplus
}
#endif
/* { dg-final { scan-assembler-not "__ARM_undef" } } */

View file

@ -1,23 +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(?: @.*|)
** ...
** vqrdmladht.s8 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int8x16_t
foo (int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
{
return vqrdmladhq_m_s8 (inactive, a, b, p);
}
/* { dg-final { scan-assembler "vpst" } } */
/* { dg-final { scan-assembler "vqrdmladht.s8" } } */
/*
**foo1:
** ...
** vmsr p0, (?:ip|fp|r[0-9]+)(?: @.*|)
** ...
** vpst(?: @.*|)
** ...
** vqrdmladht.s8 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int8x16_t
foo1 (int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
{
return vqrdmladhq_m (inactive, a, b, p);
}
/* { dg-final { scan-assembler "vpst" } } */
/* { dg-final { scan-assembler "vqrdmladht.s8" } } */
#ifdef __cplusplus
}
#endif
/* { dg-final { scan-assembler-not "__ARM_undef" } } */

View file

@ -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:
** ...
** vqrdmladh.s16 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int16x8_t
foo (int16x8_t inactive, int16x8_t a, int16x8_t b)
{
return vqrdmladhq_s16 (inactive, a, b);
}
/* { dg-final { scan-assembler "vqrdmladh.s16" } } */
/*
**foo1:
** ...
** vqrdmladh.s16 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int16x8_t
foo1 (int16x8_t inactive, int16x8_t a, int16x8_t b)
{
return vqrdmladhq (inactive, a, b);
}
/* { dg-final { scan-assembler "vqrdmladh.s16" } } */
#ifdef __cplusplus
}
#endif
/* { dg-final { scan-assembler-not "__ARM_undef" } } */

View file

@ -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:
** ...
** vqrdmladh.s32 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int32x4_t
foo (int32x4_t inactive, int32x4_t a, int32x4_t b)
{
return vqrdmladhq_s32 (inactive, a, b);
}
/* { dg-final { scan-assembler "vqrdmladh.s32" } } */
/*
**foo1:
** ...
** vqrdmladh.s32 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int32x4_t
foo1 (int32x4_t inactive, int32x4_t a, int32x4_t b)
{
return vqrdmladhq (inactive, a, b);
}
/* { dg-final { scan-assembler "vqrdmladh.s32" } } */
#ifdef __cplusplus
}
#endif
/* { dg-final { scan-assembler-not "__ARM_undef" } } */

View file

@ -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:
** ...
** vqrdmladh.s8 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int8x16_t
foo (int8x16_t inactive, int8x16_t a, int8x16_t b)
{
return vqrdmladhq_s8 (inactive, a, b);
}
/* { dg-final { scan-assembler "vqrdmladh.s8" } } */
/*
**foo1:
** ...
** vqrdmladh.s8 q[0-9]+, q[0-9]+, q[0-9]+(?: @.*|)
** ...
*/
int8x16_t
foo1 (int8x16_t inactive, int8x16_t a, int8x16_t b)
{
return vqrdmladhq (inactive, a, b);
}
/* { dg-final { scan-assembler "vqrdmladh.s8" } } */
#ifdef __cplusplus
}
#endif
/* { dg-final { scan-assembler-not "__ARM_undef" } } */