From 25350308a5373048daf6718da30eac968f59213a Mon Sep 17 00:00:00 2001 From: Amol Pise Date: Mon, 28 Jan 2013 10:45:41 +0000 Subject: [PATCH] For Amol Pise. 2013-01-27 Amol Pise * gcc.target/arm/neon-vfnms-1.c: New test. * gcc.target/arm/neon-vfnma-1.c: New test. From-SVN: r195503 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/arm/neon-vfnma-1.c | 12 ++++++++++++ gcc/testsuite/gcc.target/arm/neon-vfnms-1.c | 12 ++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arm/neon-vfnma-1.c create mode 100644 gcc/testsuite/gcc.target/arm/neon-vfnms-1.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e5e1949..3b3df08 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-01-27 Amol Pise + + * gcc.target/arm/neon-vfnms-1.c: New test. + * gcc.target/arm/neon-vfnma-1.c: New test. + 2013-01-27 Uros Bizjak PR target/56114 diff --git a/gcc/testsuite/gcc.target/arm/neon-vfnma-1.c b/gcc/testsuite/gcc.target/arm/neon-vfnma-1.c new file mode 100644 index 0000000..ce31662 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/neon-vfnma-1.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neonv2_ok } */ +/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ +/* { dg-add-options arm_neonv2 } */ +/* { dg-final { scan-assembler "vfnma\\.f32\[ \]+\[dDqQ]" } } */ + +/* Verify that VFNMA is used. */ +void f1(int n, float a, float x[], float y[]) { + int i; + for (i = 0; i < n; ++i) + y[i] = a * -x[i] - y[i]; +} diff --git a/gcc/testsuite/gcc.target/arm/neon-vfnms-1.c b/gcc/testsuite/gcc.target/arm/neon-vfnms-1.c new file mode 100644 index 0000000..c48a707 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/neon-vfnms-1.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neonv2_ok } */ +/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */ +/* { dg-add-options arm_neonv2 } */ +/* { dg-final { scan-assembler "vfnms\\.f32\[ \]+\[dDqQ]" } } */ + +/* Verify that VFNMS is used. */ +void f1(int n, float a, float x[], float y[]) { + int i; + for (i = 0; i < n; ++i) + y[i] = a * x[i] - y[i]; +} -- 2.7.4