diff mbox series

testsuite: arm: Use effective-target for pr68674.c test

Message ID 20241108174453.2660197-1-torbjorn.svensson@foss.st.com
State New
Headers show
Series testsuite: arm: Use effective-target for pr68674.c test | expand

Commit Message

Torbjorn SVENSSON Nov. 8, 2024, 5:44 p.m. UTC
Ok for trunk and releases/gcc-14?

--

gcc/testsuite/ChangeLog:

	* gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
	and arm_libc_fp_abi.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
 gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Christophe Lyon Nov. 14, 2024, 3:26 p.m. UTC | #1
On Fri, 8 Nov 2024 at 18:54, Torbjörn SVENSSON
<torbjorn.svensson@foss.st.com> wrote:
>
> Ok for trunk and releases/gcc-14?
>
Can you describe what problem you are trying to fix?

I'm guessing it's similar to your other patch for attr-neon* tests?
And that the best / easiest course of action for the moment is to skip
this test on M-profile?

Thanks,

Christophe

> --
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
>         and arm_libc_fp_abi.
>
> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
> ---
>  gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/gcc.target/arm/pr68674.c
> index 0b3237458fe..3fd562d0518 100644
> --- a/gcc/testsuite/gcc.target/arm/pr68674.c
> +++ b/gcc/testsuite/gcc.target/arm/pr68674.c
> @@ -1,9 +1,10 @@
>  /* PR target/68674 */
>  /* { dg-do compile } */
> -/* { dg-require-effective-target arm_neon_ok } */
> -/* { dg-require-effective-target arm_fp_ok } */
> +/* { dg-require-effective-target arm_arch_v7a_ok } */
> +/* { dg-require-effective-target arm_libc_fp_abi_ok } */
>  /* { dg-options "-O2" } */
> -/* { dg-add-options arm_fp } */
> +/* { dg-add-options arm_arch_v7a } */
> +/* { dg-add-options arm_libc_fp_abi } */
>
>  #pragma GCC target ("fpu=vfp")
>
> --
> 2.25.1
>
Torbjorn SVENSSON Nov. 14, 2024, 4:32 p.m. UTC | #2
On 2024-11-14 16:26, Christophe Lyon wrote:
> On Fri, 8 Nov 2024 at 18:54, Torbjörn SVENSSON
> <torbjorn.svensson@foss.st.com> wrote:
>>
>> Ok for trunk and releases/gcc-14?
>>
> Can you describe what problem you are trying to fix?
> 
> I'm guessing it's similar to your other patch for attr-neon* tests?
> And that the best / easiest course of action for the moment is to skip
> this test on M-profile?

Exactly.
Without my patch, it would fail for armv8.1-m.main targets with 
-mfloat-abi=hard due to that the include file "arm_neon.h" is not 
compatible with Cortex-M. The test cases will therefor fail due to 
excess errors (about 2500 lines of errors).
With my patch, we are always testing this in armv7-a context where the 
FPU used in the test case is compatible.

Kind regards,
Torbjörn

> 
> Thanks,
> 
> Christophe
> 
>> --
>>
>> gcc/testsuite/ChangeLog:
>>
>>          * gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
>>          and arm_libc_fp_abi.
>>
>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
>> ---
>>   gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/gcc.target/arm/pr68674.c
>> index 0b3237458fe..3fd562d0518 100644
>> --- a/gcc/testsuite/gcc.target/arm/pr68674.c
>> +++ b/gcc/testsuite/gcc.target/arm/pr68674.c
>> @@ -1,9 +1,10 @@
>>   /* PR target/68674 */
>>   /* { dg-do compile } */
>> -/* { dg-require-effective-target arm_neon_ok } */
>> -/* { dg-require-effective-target arm_fp_ok } */
>> +/* { dg-require-effective-target arm_arch_v7a_ok } */
>> +/* { dg-require-effective-target arm_libc_fp_abi_ok } */
>>   /* { dg-options "-O2" } */
>> -/* { dg-add-options arm_fp } */
>> +/* { dg-add-options arm_arch_v7a } */
>> +/* { dg-add-options arm_libc_fp_abi } */
>>
>>   #pragma GCC target ("fpu=vfp")
>>
>> --
>> 2.25.1
>>
Torbjorn SVENSSON Dec. 19, 2024, 7:22 p.m. UTC | #3
Gentle ping :)

Kind regards,
Torbjörn

On 2024-11-14 17:32, Torbjorn SVENSSON wrote:
> 
> 
> On 2024-11-14 16:26, Christophe Lyon wrote:
>> On Fri, 8 Nov 2024 at 18:54, Torbjörn SVENSSON
>> <torbjorn.svensson@foss.st.com> wrote:
>>>
>>> Ok for trunk and releases/gcc-14?
>>>
>> Can you describe what problem you are trying to fix?
>>
>> I'm guessing it's similar to your other patch for attr-neon* tests?
>> And that the best / easiest course of action for the moment is to skip
>> this test on M-profile?
> 
> Exactly.
> Without my patch, it would fail for armv8.1-m.main targets with -mfloat- 
> abi=hard due to that the include file "arm_neon.h" is not compatible 
> with Cortex-M. The test cases will therefor fail due to excess errors 
> (about 2500 lines of errors).
> With my patch, we are always testing this in armv7-a context where the 
> FPU used in the test case is compatible.
> 
> Kind regards,
> Torbjörn
> 
>>
>> Thanks,
>>
>> Christophe
>>
>>> -- 
>>>
>>> gcc/testsuite/ChangeLog:
>>>
>>>          * gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
>>>          and arm_libc_fp_abi.
>>>
>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
>>> ---
>>>   gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
>>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/ 
>>> gcc.target/arm/pr68674.c
>>> index 0b3237458fe..3fd562d0518 100644
>>> --- a/gcc/testsuite/gcc.target/arm/pr68674.c
>>> +++ b/gcc/testsuite/gcc.target/arm/pr68674.c
>>> @@ -1,9 +1,10 @@
>>>   /* PR target/68674 */
>>>   /* { dg-do compile } */
>>> -/* { dg-require-effective-target arm_neon_ok } */
>>> -/* { dg-require-effective-target arm_fp_ok } */
>>> +/* { dg-require-effective-target arm_arch_v7a_ok } */
>>> +/* { dg-require-effective-target arm_libc_fp_abi_ok } */
>>>   /* { dg-options "-O2" } */
>>> -/* { dg-add-options arm_fp } */
>>> +/* { dg-add-options arm_arch_v7a } */
>>> +/* { dg-add-options arm_libc_fp_abi } */
>>>
>>>   #pragma GCC target ("fpu=vfp")
>>>
>>> -- 
>>> 2.25.1
>>>
>
Torbjorn SVENSSON Jan. 24, 2025, 5:42 p.m. UTC | #4
Another ping... :)

Kind regards,
Torbjörn

On 2024-12-19 20:22, Torbjorn SVENSSON wrote:
> Gentle ping :)
> 
> Kind regards,
> Torbjörn
> 
> On 2024-11-14 17:32, Torbjorn SVENSSON wrote:
>>
>>
>> On 2024-11-14 16:26, Christophe Lyon wrote:
>>> On Fri, 8 Nov 2024 at 18:54, Torbjörn SVENSSON
>>> <torbjorn.svensson@foss.st.com> wrote:
>>>>
>>>> Ok for trunk and releases/gcc-14?
>>>>
>>> Can you describe what problem you are trying to fix?
>>>
>>> I'm guessing it's similar to your other patch for attr-neon* tests?
>>> And that the best / easiest course of action for the moment is to skip
>>> this test on M-profile?
>>
>> Exactly.
>> Without my patch, it would fail for armv8.1-m.main targets with - 
>> mfloat- abi=hard due to that the include file "arm_neon.h" is not 
>> compatible with Cortex-M. The test cases will therefor fail due to 
>> excess errors (about 2500 lines of errors).
>> With my patch, we are always testing this in armv7-a context where the 
>> FPU used in the test case is compatible.
>>
>> Kind regards,
>> Torbjörn
>>
>>>
>>> Thanks,
>>>
>>> Christophe
>>>
>>>> -- 
>>>>
>>>> gcc/testsuite/ChangeLog:
>>>>
>>>>          * gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
>>>>          and arm_libc_fp_abi.
>>>>
>>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
>>>> ---
>>>>   gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
>>>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/ 
>>>> gcc.target/arm/pr68674.c
>>>> index 0b3237458fe..3fd562d0518 100644
>>>> --- a/gcc/testsuite/gcc.target/arm/pr68674.c
>>>> +++ b/gcc/testsuite/gcc.target/arm/pr68674.c
>>>> @@ -1,9 +1,10 @@
>>>>   /* PR target/68674 */
>>>>   /* { dg-do compile } */
>>>> -/* { dg-require-effective-target arm_neon_ok } */
>>>> -/* { dg-require-effective-target arm_fp_ok } */
>>>> +/* { dg-require-effective-target arm_arch_v7a_ok } */
>>>> +/* { dg-require-effective-target arm_libc_fp_abi_ok } */
>>>>   /* { dg-options "-O2" } */
>>>> -/* { dg-add-options arm_fp } */
>>>> +/* { dg-add-options arm_arch_v7a } */
>>>> +/* { dg-add-options arm_libc_fp_abi } */
>>>>
>>>>   #pragma GCC target ("fpu=vfp")
>>>>
>>>> -- 
>>>> 2.25.1
>>>>
>>
>
Richard Earnshaw (lists) Feb. 28, 2025, 3:06 p.m. UTC | #5
On 08/11/2024 17:44, Torbjörn SVENSSON wrote:
> Ok for trunk and releases/gcc-14?
> 
> --
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
> 	and arm_libc_fp_abi.
> 
> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
> ---
>   gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/gcc.target/arm/pr68674.c
> index 0b3237458fe..3fd562d0518 100644
> --- a/gcc/testsuite/gcc.target/arm/pr68674.c
> +++ b/gcc/testsuite/gcc.target/arm/pr68674.c
> @@ -1,9 +1,10 @@
>   /* PR target/68674 */
>   /* { dg-do compile } */
> -/* { dg-require-effective-target arm_neon_ok } */
> -/* { dg-require-effective-target arm_fp_ok } */
> +/* { dg-require-effective-target arm_arch_v7a_ok } */
> +/* { dg-require-effective-target arm_libc_fp_abi_ok } */
>   /* { dg-options "-O2" } */
> -/* { dg-add-options arm_fp } */
> +/* { dg-add-options arm_arch_v7a } */
> +/* { dg-add-options arm_libc_fp_abi } */
>   
>   #pragma GCC target ("fpu=vfp")
>   

I've spent some time thinking about this issue.  If we change the test 
in the way you suggest we lose some coverage of other variants where 
this ought to work, but the alternative is to only run the test on 
platforms where the base architecture is compatible with neon anyway, so 
we lose coverage for other builds entirely.

So there's no easy answer here.  However, the options you've picked 
above pretty much match the original bug report.  I think that's sufficient.

OK, and apologies for taking so long pondering this issue.

R.
Torbjorn SVENSSON March 4, 2025, 4:59 p.m. UTC | #6
On 2025-02-28 16:06, Richard Earnshaw wrote:
> On 08/11/2024 17:44, Torbjörn SVENSSON wrote:
>> Ok for trunk and releases/gcc-14?
>>
>> -- 
>>
>> gcc/testsuite/ChangeLog:
>>
>>     * gcc.target/arm/pr68674.c: Use effective-target arm_arch_v7a
>>     and arm_libc_fp_abi.
>>
>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
>> ---
>>   gcc/testsuite/gcc.target/arm/pr68674.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/ 
>> gcc.target/arm/pr68674.c
>> index 0b3237458fe..3fd562d0518 100644
>> --- a/gcc/testsuite/gcc.target/arm/pr68674.c
>> +++ b/gcc/testsuite/gcc.target/arm/pr68674.c
>> @@ -1,9 +1,10 @@
>>   /* PR target/68674 */
>>   /* { dg-do compile } */
>> -/* { dg-require-effective-target arm_neon_ok } */
>> -/* { dg-require-effective-target arm_fp_ok } */
>> +/* { dg-require-effective-target arm_arch_v7a_ok } */
>> +/* { dg-require-effective-target arm_libc_fp_abi_ok } */
>>   /* { dg-options "-O2" } */
>> -/* { dg-add-options arm_fp } */
>> +/* { dg-add-options arm_arch_v7a } */
>> +/* { dg-add-options arm_libc_fp_abi } */
>>   #pragma GCC target ("fpu=vfp")
> 
> I've spent some time thinking about this issue.  If we change the test 
> in the way you suggest we lose some coverage of other variants where 
> this ought to work, but the alternative is to only run the test on 
> platforms where the base architecture is compatible with neon anyway, so 
> we lose coverage for other builds entirely.
> 
> So there's no easy answer here.  However, the options you've picked 
> above pretty much match the original bug report.  I think that's 
> sufficient.
> 
> OK, and apologies for taking so long pondering this issue.
> 
> R.

Pushed as r15-7815-g879fd9c8226 and r14.2.0-852-ga42ef0938f3.

Kind regards,
Torbjörn
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/gcc.target/arm/pr68674.c
index 0b3237458fe..3fd562d0518 100644
--- a/gcc/testsuite/gcc.target/arm/pr68674.c
+++ b/gcc/testsuite/gcc.target/arm/pr68674.c
@@ -1,9 +1,10 @@ 
 /* PR target/68674 */
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_neon_ok } */
-/* { dg-require-effective-target arm_fp_ok } */
+/* { dg-require-effective-target arm_arch_v7a_ok } */
+/* { dg-require-effective-target arm_libc_fp_abi_ok } */
 /* { dg-options "-O2" } */
-/* { dg-add-options arm_fp } */
+/* { dg-add-options arm_arch_v7a } */
+/* { dg-add-options arm_libc_fp_abi } */
 
 #pragma GCC target ("fpu=vfp")