diff mbox

Commit: Try harder to run ARM neon testcases

Message ID 5697A223.7060207@redhat.com
State New
Headers show

Commit Message

Nick Clifton Jan. 14, 2016, 1:26 p.m. UTC
Hi Christian,

>>     * gcc.target/arm/attr-neon.c: Use dg-add-options to add the
>>     command line options necessary to enable Neon support.
>
> is this last one needed ? the __attribute__ ((target("fpu=neon"))) is
> here to test without -mfpu=neon. So we are losing something here.

Ah, good point.  We still need that arm_neon options in order to 
correctly select NEON support, so how about this variation then:

  /* Verify that neon instructions are emitted once.  */
  void __attribute__ ((target("fpu=neon")))


That works in my local tests.  Are you OK with it ?

Cheers
   Nick

Comments

Christian Bruel Jan. 14, 2016, 2:05 p.m. UTC | #1
On 01/14/2016 02:26 PM, Nick Clifton wrote:
> Hi Christian,
>
>>>      * gcc.target/arm/attr-neon.c: Use dg-add-options to add the
>>>      command line options necessary to enable Neon support.
>> is this last one needed ? the __attribute__ ((target("fpu=neon"))) is
>> here to test without -mfpu=neon. So we are losing something here.
> Ah, good point.  We still need that arm_neon options in order to
> correctly select NEON support, so how about this variation then:
>
> Index: gcc/testsuite/gcc.target/arm/attr-neon.c
> ===================================================================
> --- gcc/testsuite/gcc.target/arm/attr-neon.c	(revision 232362)
> +++ gcc/testsuite/gcc.target/arm/attr-neon.c	(working copy)
> @@ -1,7 +1,7 @@
>    /* { dg-do compile } */
>    /* { dg-require-effective-target arm_neon_ok } */
>    /* { dg-options "-O2 -ftree-vectorize" } */
> -/* { dg-add-options arm_neon } */
> +/* { dg-add-options arm_neon arm_v8_vfp } */ /* The arm_v8_vfp adds
> -mfpu=fp-armv8 to the command line, overriding any -mfpu= option set by
> arm_neon, thus ensuring that the attributes below really are checked for
> correct fpu selection.  */
>
>    /* Verify that neon instructions are emitted once.  */
>    void __attribute__ ((target("fpu=neon")))
>
>
> That works in my local tests.  Are you OK with it ?

yeah, I checked that it tests the attribute in my configuration as well.
just to make things less obfuscated, What about /* { 
dg-additional-options "-mfpu=fp-armv8 } */ instead, eventually with a 
selector for armv7-a.
just an idea, I let you choose

thanks


>
> Cheers
>     Nick
Nick Clifton Jan. 14, 2016, 3:04 p.m. UTC | #2
Hi Christian,

>> That works in my local tests.  Are you OK with it ?
>
> yeah, I checked that it tests the attribute in my configuration as well.
> just to make things less obfuscated, What about /* {
> dg-additional-options "-mfpu=fp-armv8 } */ instead, eventually with a
> selector for armv7-a.
> just an idea, I let you choose

I tried that - it does not work. :-(  If you put dg-additional-options 
after a dg-add-options you loose the dg-add-options...

I'll check in the updated patch.

Cheers
   Nick
diff mbox

Patch

Index: gcc/testsuite/gcc.target/arm/attr-neon.c
===================================================================
--- gcc/testsuite/gcc.target/arm/attr-neon.c	(revision 232362)
+++ gcc/testsuite/gcc.target/arm/attr-neon.c	(working copy)
@@ -1,7 +1,7 @@ 
  /* { dg-do compile } */
  /* { dg-require-effective-target arm_neon_ok } */
  /* { dg-options "-O2 -ftree-vectorize" } */
-/* { dg-add-options arm_neon } */
+/* { dg-add-options arm_neon arm_v8_vfp } */ /* The arm_v8_vfp adds 
-mfpu=fp-armv8 to the command line, overriding any -mfpu= option set by 
arm_neon, thus ensuring that the attributes below really are checked for 
correct fpu selection.  */