Commit: Try harder to run ARM neon testcases

Christian Bruel christian.bruel@st.com
Thu Jan 14 14:06:00 GMT 2016


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



More information about the Gcc-patches mailing list