public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Cortex-A15 vfnma/vfnms test patch
@ 2013-01-21 10:03 amol pise
  2013-01-22  5:04 ` amol pise
  2013-01-28 10:48 ` Ramana Radhakrishnan
  0 siblings, 2 replies; 7+ messages in thread
From: amol pise @ 2013-01-21 10:03 UTC (permalink / raw)
  To: gcc-patches, gcc-help; +Cc: amolpise15

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

Dear All,

I am working on Cortex-A15 using latest GCC toolchain.
As we know that VFPv4 and SIMDv2 are the Cortex-A15 CPU Features,
so, compared to VFPv3/ SIMDv1, in VFPv4/SIMDv2 has following
additional instruction support
 * VFMA, VFMS - Fused multiply accumulate, Fused multiply subtract.
 * VFNMA, VFNMS - Fused multiply accumulate with negation, Fused
multiply subtract with negation.

To check whether these instructions are generated or not. I took  the
GCC-4.8  branch (snapshot) from FSF.

I noticed there are following testcases available for  VFMA, VFMS instructions
 * gcc/testsuite/gcc.target/arm/neon-vfma-1.c
 * gcc/testsuite/gcc.target/arm/neon-vfms-1.c

But for the VFNMA, VFNMS  instructions there are no test case
available. So I have created the patch to test these instruction.
Please find the attached patch

I have tested these instruction with GCC and these instructions are generated.
Please review and marge this test support patch in gcc main trunk.

Thank You,
Amol Pise

[-- Attachment #2: gcc-fused-multiply-accumulate-negation-test.patch --]
[-- Type: text/plain, Size: 1363 bytes --]

diff -Narub gcc/testsuite/gcc.target/arm/neon-vfnma-1.c gcc/testsuite/gcc.target/arm/neon-vfnma-1.c
--- gcc/testsuite/gcc.target/arm/neon-vfnma-1.c	1970-01-01 05:30:00.000000000 +0530
+++ gcc/testsuite/gcc.target/arm/neon-vfnma-1.c	2013-01-21 14:30:13.000000000 +0530
@@ -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 -Narub gcc/testsuite/gcc.target/arm/neon-vfnms-1.c gcc/testsuite/gcc.target/arm/neon-vfnms-1.c
--- gcc/testsuite/gcc.target/arm/neon-vfnms-1.c	1970-01-01 05:30:00.000000000 +0530
+++ gcc/testsuite/gcc.target/arm/neon-vfnms-1.c	2013-01-21 14:30:13.000000000 +0530
@@ -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];
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-31 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-21 10:03 Cortex-A15 vfnma/vfnms test patch amol pise
2013-01-22  5:04 ` amol pise
2013-01-25 18:47   ` Mike Stump
2013-01-27 15:27     ` amol pise
2013-01-28 10:48 ` Ramana Radhakrishnan
2013-01-28 14:03   ` amol pise
2013-01-31 17:30     ` Ramana Radhakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).