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

* Re: Cortex-A15 vfnma/vfnms test patch
  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-28 10:48 ` Ramana Radhakrishnan
  1 sibling, 1 reply; 7+ messages in thread
From: amol pise @ 2013-01-22  5:04 UTC (permalink / raw)
  To: gcc-patches, gcc-help; +Cc: amolpise15

Dear All,

Please let me know the patch is OK for trunk ?

Thank You,
Amol Pise

On 1/21/13, amol pise <amolpise15@gmail.com> wrote:
> 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
>

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

* Re: Cortex-A15 vfnma/vfnms test patch
  2013-01-22  5:04 ` amol pise
@ 2013-01-25 18:47   ` Mike Stump
  2013-01-27 15:27     ` amol pise
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Stump @ 2013-01-25 18:47 UTC (permalink / raw)
  To: amol pise; +Cc: gcc-patches, gcc-help

Given what stage we are in for trunk, I'm going to let the arm folks review this…  [ this is my form of a ping for you! ]

On Jan 21, 2013, at 9:04 PM, amol pise <amolpise15@gmail.com> wrote:
> Please let me know the patch is OK for trunk ?
> 
> On 1/21/13, amol pise <amolpise15@gmail.com> wrote:
>> 
>> * gcc/testsuite/gcc.target/arm/neon-vfma-1.c
>> * gcc/testsuite/gcc.target/arm/neon-vfms-1.c

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

* Re: Cortex-A15 vfnma/vfnms test patch
  2013-01-25 18:47   ` Mike Stump
@ 2013-01-27 15:27     ` amol pise
  0 siblings, 0 replies; 7+ messages in thread
From: amol pise @ 2013-01-27 15:27 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches, gcc-help

Dear Mike,

Thanks for the  information.

Thank You,
Amol Pise

On Sat, Jan 26, 2013 at 12:17 AM, Mike Stump <mikestump@comcast.net> wrote:
> Given what stage we are in for trunk, I'm going to let the arm folks review this…  [ this is my form of a ping for you! ]
>
> On Jan 21, 2013, at 9:04 PM, amol pise <amolpise15@gmail.com> wrote:
>> Please let me know the patch is OK for trunk ?
>>
>> On 1/21/13, amol pise <amolpise15@gmail.com> wrote:
>>>
>>> * gcc/testsuite/gcc.target/arm/neon-vfma-1.c
>>> * gcc/testsuite/gcc.target/arm/neon-vfms-1.c

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

* Re: Cortex-A15 vfnma/vfnms test patch
  2013-01-21 10:03 Cortex-A15 vfnma/vfnms test patch amol pise
  2013-01-22  5:04 ` amol pise
@ 2013-01-28 10:48 ` Ramana Radhakrishnan
  2013-01-28 14:03   ` amol pise
  1 sibling, 1 reply; 7+ messages in thread
From: Ramana Radhakrishnan @ 2013-01-28 10:48 UTC (permalink / raw)
  To: amol pise; +Cc: gcc-patches



[Taking gcc-help off this thread.]

Amol,

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

Thanks for this patch and sorry about the delay in getting around to this.

This is ok and I'll take this under the 10 line rule this time .

If you intend to continue to submit patches to gcc can I ask that you 
start the process for copyright assignments or confirm that you have a 
copyright assignment on file ?

http://gcc.gnu.org/contribute.html#legal

If you don't, send an email to gcc@gcc.gnu.org with a request for 
copyright assignment papers and a maintainer will send you these.

http://gcc.gnu.org/contribute.html in general is a good summary of the 
process related to contributing patches to GCC in general . Please do 
read that and follow up on gcc@gcc.gnu.org if you have any more questions.

And finally don't forget to add a changelog to your patches as 
documented in links from the above mentioned page. Since this is your 
first time I've added the following Changelog entry for your patch and 
applied it.

regards
Ramana



2013-01-27  Amol Pise  <amolpise15@gmail.com>

	* gcc.target/arm/neon-vfnms-1.c: New test.
	* gcc.target/arm/neon-vfnma-1.c: New test.




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

* Re: Cortex-A15 vfnma/vfnms test patch
  2013-01-28 10:48 ` Ramana Radhakrishnan
@ 2013-01-28 14:03   ` amol pise
  2013-01-31 17:30     ` Ramana Radhakrishnan
  0 siblings, 1 reply; 7+ messages in thread
From: amol pise @ 2013-01-28 14:03 UTC (permalink / raw)
  To: ramrad01; +Cc: gcc-patches

Dear Ramana,

Thank You very much for the changelog and commit of my patch in gcc.
I will follow the steps mentioned by you.

Thank You,
Amol Pise


On Mon, Jan 28, 2013 at 4:18 PM, Ramana Radhakrishnan <ramrad01@arm.com> wrote:
>
>
> [Taking gcc-help off this thread.]
>
> Amol,
>
>
>> I have tested these instruction with GCC and these instructions are
>> generated.
>> Please review and marge this test support patch in gcc main trunk.
>
>
> Thanks for this patch and sorry about the delay in getting around to this.
>
> This is ok and I'll take this under the 10 line rule this time .
>
> If you intend to continue to submit patches to gcc can I ask that you start
> the process for copyright assignments or confirm that you have a copyright
> assignment on file ?
>
> http://gcc.gnu.org/contribute.html#legal
>
> If you don't, send an email to gcc@gcc.gnu.org with a request for copyright
> assignment papers and a maintainer will send you these.
>
> http://gcc.gnu.org/contribute.html in general is a good summary of the
> process related to contributing patches to GCC in general . Please do read
> that and follow up on gcc@gcc.gnu.org if you have any more questions.
>
> And finally don't forget to add a changelog to your patches as documented in
> links from the above mentioned page. Since this is your first time I've
> added the following Changelog entry for your patch and applied it.
>
> regards
> Ramana
>
>
>
> 2013-01-27  Amol Pise  <amolpise15@gmail.com>
>
>         * gcc.target/arm/neon-vfnms-1.c: New test.
>         * gcc.target/arm/neon-vfnma-1.c: New test.
>
>
>
>

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

* Re: Cortex-A15 vfnma/vfnms test patch
  2013-01-28 14:03   ` amol pise
@ 2013-01-31 17:30     ` Ramana Radhakrishnan
  0 siblings, 0 replies; 7+ messages in thread
From: Ramana Radhakrishnan @ 2013-01-31 17:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: amol pise

On 01/28/13 14:03, amol pise wrote:
> Dear Ramana,
>
> Thank You very much for the changelog and commit of my patch in gcc.
> I will follow the steps mentioned by you.


There are no vector forms for the vfnma and vfnms instructions.

A co-worker (thanks Kyryll) just pointed out to me that I'd misread the 
ARM-ARM when I checked this and it looks like the test run I did had 
failed but it looks I looked I checked the wrong work area.

Looking at the output a bit more carefully now compared to what I did 
the other day I see only the scalar forms being generated.

Also the ARM-ARM specifies that these instructions only have the scalar 
forms (Section 8.8.318)

vfnm<>.f64 Dd, Dn, Dm
vfnm<>.f32 Sd, Sn, Sm

instructions.

I have now reverted this patch as obvious.

Sorry about the inconvenience caused.


regards
Ramana

>
> Thank You,
> Amol Pise
>
>
> On Mon, Jan 28, 2013 at 4:18 PM, Ramana Radhakrishnan <ramrad01@arm.com> wrote:
>>
>>
>> [Taking gcc-help off this thread.]
>>
>> Amol,
>>
>>
>>> I have tested these instruction with GCC and these instructions are
>>> generated.
>>> Please review and marge this test support patch in gcc main trunk.
>>
>>
>> Thanks for this patch and sorry about the delay in getting around to this.
>>
>> This is ok and I'll take this under the 10 line rule this time .
>>
>> If you intend to continue to submit patches to gcc can I ask that you start
>> the process for copyright assignments or confirm that you have a copyright
>> assignment on file ?
>>
>> http://gcc.gnu.org/contribute.html#legal
>>
>> If you don't, send an email to gcc@gcc.gnu.org with a request for copyright
>> assignment papers and a maintainer will send you these.
>>
>> http://gcc.gnu.org/contribute.html in general is a good summary of the
>> process related to contributing patches to GCC in general . Please do read
>> that and follow up on gcc@gcc.gnu.org if you have any more questions.
>>
>> And finally don't forget to add a changelog to your patches as documented in
>> links from the above mentioned page. Since this is your first time I've
>> added the following Changelog entry for your patch and applied it.
>>
>> regards
>> Ramana
>>
>>
>>
>> 2013-01-27  Amol Pise  <amolpise15@gmail.com>
>>
>>          * gcc.target/arm/neon-vfnms-1.c: New test.
>>          * gcc.target/arm/neon-vfnma-1.c: New test.
>>
>>
>>
>>
>


^ 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).