testsuite, arm: Fix up pr112337.c test

Message ID 85bf6edd-748e-492f-a511-3bdb53edf49a@arm.com
State Committed
Commit 8bc06e8302116267c47c640b03c5eceef9da15ca
Headers
Series testsuite, arm: Fix up pr112337.c test |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed

Commit Message

Saurabh Jha Dec. 1, 2023, 11:28 a.m. UTC
  Hey,

I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test.

Did regression testing on arm-none-eabi and found no regressions. Output of running gcc/contrib/compare_tests is this:

"""
Tests that now work, but didn't before (2 tests):

arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp: gcc.target/arm/mve/pr112337.c (test for excess errors)
arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard: gcc.target/arm/mve/pr112337.c (test for excess errors)
"""

Ok for trunk? I don't have commit access so could someone please commit on my behalf?

Regards,
Saurabh

gcc/testsuite/ChangeLog:

         * gcc.target/arm/mve/pr112337.c: Fix the testcase
From 2365aae84de030bbb006edac18c9314812fc657b Mon Sep 17 00:00:00 2001
From: Saurabh Jha <saujha01@e130340.arm.com>
Date: Tue, 28 Nov 2023 13:05:58 +0000
Subject: [PATCH] testsuite: Fix up pr112337.c test

---
 gcc/testsuite/gcc.target/arm/mve/pr112337.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Richard Earnshaw (lists) Dec. 1, 2023, 12:44 p.m. UTC | #1
On 01/12/2023 11:28, Saurabh Jha wrote:
> Hey,
> 
> I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test.
> 
> Did regression testing on arm-none-eabi and found no regressions. Output of running gcc/contrib/compare_tests is this:
> 
> """
> Tests that now work, but didn't before (2 tests):
> 
> arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp: gcc.target/arm/mve/pr112337.c (test for excess errors)
> arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard: gcc.target/arm/mve/pr112337.c (test for excess errors)
> """
> 
> Ok for trunk? I don't have commit access so could someone please commit on my behalf?
> 
> Regards,
> Saurabh
> 
> gcc/testsuite/ChangeLog:
> 
>         * gcc.target/arm/mve/pr112337.c: Fix the testcase


Hmm, could this be related to the changes Christophe made recently to change the way MVE vector types were set up internally?  If so, this might indicate an issue that's going to affect real users with existing code.

Christophe?

R.
  
Christophe Lyon Dec. 1, 2023, 1:45 p.m. UTC | #2
On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists)
<Richard.Earnshaw@arm.com> wrote:
>
> On 01/12/2023 11:28, Saurabh Jha wrote:
> > Hey,
> >
> > I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test.
> >
> > Did regression testing on arm-none-eabi and found no regressions. Output of running gcc/contrib/compare_tests is this:
> >
> > """
> > Tests that now work, but didn't before (2 tests):
> >
> > arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp: gcc.target/arm/mve/pr112337.c (test for excess errors)
> > arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard: gcc.target/arm/mve/pr112337.c (test for excess errors)
> > """
> >
> > Ok for trunk? I don't have commit access so could someone please commit on my behalf?
> >
> > Regards,
> > Saurabh
> >
> > gcc/testsuite/ChangeLog:
> >
> >         * gcc.target/arm/mve/pr112337.c: Fix the testcase
>
>
> Hmm, could this be related to the changes Christophe made recently to change the way MVE vector types were set up internally?  If so, this might indicate an issue that's going to affect real users with existing code.
>

My change was only about vector types, here the problem is with a
pointer to a scalar.
Anyway, I ran the test with my commit reverted and it still fails in
the same way, so I think this patch is needed.

Thanks,

Christophe

> Christophe?
>
> R.
  
Richard Earnshaw (lists) Dec. 1, 2023, 2:10 p.m. UTC | #3
On 01/12/2023 13:45, Christophe Lyon wrote:
> On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists)
> <Richard.Earnshaw@arm.com> wrote:
>>
>> On 01/12/2023 11:28, Saurabh Jha wrote:
>>> Hey,
>>>
>>> I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test.
>>>
>>> Did regression testing on arm-none-eabi and found no regressions. Output of running gcc/contrib/compare_tests is this:
>>>
>>> """
>>> Tests that now work, but didn't before (2 tests):
>>>
>>> arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp: gcc.target/arm/mve/pr112337.c (test for excess errors)
>>> arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard: gcc.target/arm/mve/pr112337.c (test for excess errors)
>>> """
>>>
>>> Ok for trunk? I don't have commit access so could someone please commit on my behalf?
>>>
>>> Regards,
>>> Saurabh
>>>
>>> gcc/testsuite/ChangeLog:
>>>
>>>         * gcc.target/arm/mve/pr112337.c: Fix the testcase
>>
>>
>> Hmm, could this be related to the changes Christophe made recently to change the way MVE vector types were set up internally?  If so, this might indicate an issue that's going to affect real users with existing code.
>>
> 
> My change was only about vector types, here the problem is with a
> pointer to a scalar.
> Anyway, I ran the test with my commit reverted and it still fails in
> the same way, so I think this patch is needed.
> 
> Thanks,
> 
> Christophe
> 
>> Christophe?
>>
>> R.

Ok, thanks for checking.  In that case, Saurabh, your patch is OK, but please change 'Fix testcase' to 'Use int32_t instead of int.'

Note that ChangeLog entries end with a full stop.

R.
  
Saurabh Jha Dec. 1, 2023, 4:46 p.m. UTC | #4
On 12/1/2023 2:10 PM, Richard Earnshaw (lists) wrote:
> On 01/12/2023 13:45, Christophe Lyon wrote:
>> On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists)
>> <Richard.Earnshaw@arm.com> wrote:
>>> On 01/12/2023 11:28, Saurabh Jha wrote:
>>>> Hey,
>>>>
>>>> I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test.
>>>>
>>>> Did regression testing on arm-none-eabi and found no regressions. Output of running gcc/contrib/compare_tests is this:
>>>>
>>>> """
>>>> Tests that now work, but didn't before (2 tests):
>>>>
>>>> arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp: gcc.target/arm/mve/pr112337.c (test for excess errors)
>>>> arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard: gcc.target/arm/mve/pr112337.c (test for excess errors)
>>>> """
>>>>
>>>> Ok for trunk? I don't have commit access so could someone please commit on my behalf?
>>>>
>>>> Regards,
>>>> Saurabh
>>>>
>>>> gcc/testsuite/ChangeLog:
>>>>
>>>>          * gcc.target/arm/mve/pr112337.c: Fix the testcase
>>>
>>> Hmm, could this be related to the changes Christophe made recently to change the way MVE vector types were set up internally?  If so, this might indicate an issue that's going to affect real users with existing code.
>>>
>> My change was only about vector types, here the problem is with a
>> pointer to a scalar.
>> Anyway, I ran the test with my commit reverted and it still fails in
>> the same way, so I think this patch is needed.
>>
>> Thanks,
>>
>> Christophe
>>
>>> Christophe?
>>>
>>> R.
> Ok, thanks for checking.  In that case, Saurabh, your patch is OK, but please change 'Fix testcase' to 'Use int32_t instead of int.'
>
> Note that ChangeLog entries end with a full stop.
>
> R.

Thank you for the feedback. Please find the updated ChangeLog below.

gcc/testsuite/ChangeLog:

         * gcc.target/arm/mve/pr112337.c: Use int32_t instead of int.
From 2365aae84de030bbb006edac18c9314812fc657b Mon Sep 17 00:00:00 2001
From: Saurabh Jha <saujha01@e130340.arm.com>
Date: Tue, 28 Nov 2023 13:05:58 +0000
Subject: [PATCH] testsuite: Fix up pr112337.c test

---
 gcc/testsuite/gcc.target/arm/mve/pr112337.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/mve/pr112337.c b/gcc/testsuite/gcc.target/arm/mve/pr112337.c
index 8f491990088..d1a075ecd0e 100644
--- a/gcc/testsuite/gcc.target/arm/mve/pr112337.c
+++ b/gcc/testsuite/gcc.target/arm/mve/pr112337.c
@@ -5,8 +5,8 @@
 #include <arm_mve.h>
 
 void g(int32x4_t);
-void f(int, int, int, short, int *p) {
-  int *bias = p;
+void f(int, int, int, short, int32_t *p) {
+  int32_t *bias = p;
   for (;;) {
     int32x4_t d = vldrwq_s32 (p);
     bias += 4;
  
Richard Sandiford Dec. 3, 2023, 4:16 p.m. UTC | #5
Saurabh Jha <saurabh.jha@arm.com> writes:
> On 12/1/2023 2:10 PM, Richard Earnshaw (lists) wrote:
>> On 01/12/2023 13:45, Christophe Lyon wrote:
>>> On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists)
>>> <Richard.Earnshaw@arm.com> wrote:
>>>> On 01/12/2023 11:28, Saurabh Jha wrote:
>>>>> Hey,
>>>>>
>>>>> I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test.
>>>>>
>>>>> Did regression testing on arm-none-eabi and found no regressions. Output of running gcc/contrib/compare_tests is this:
>>>>>
>>>>> """
>>>>> Tests that now work, but didn't before (2 tests):
>>>>>
>>>>> arm-eabi-aem/-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp: gcc.target/arm/mve/pr112337.c (test for excess errors)
>>>>> arm-eabi-aem/-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard: gcc.target/arm/mve/pr112337.c (test for excess errors)
>>>>> """
>>>>>
>>>>> Ok for trunk? I don't have commit access so could someone please commit on my behalf?
>>>>>
>>>>> Regards,
>>>>> Saurabh
>>>>>
>>>>> gcc/testsuite/ChangeLog:
>>>>>
>>>>>          * gcc.target/arm/mve/pr112337.c: Fix the testcase
>>>>
>>>> Hmm, could this be related to the changes Christophe made recently to change the way MVE vector types were set up internally?  If so, this might indicate an issue that's going to affect real users with existing code.
>>>>
>>> My change was only about vector types, here the problem is with a
>>> pointer to a scalar.
>>> Anyway, I ran the test with my commit reverted and it still fails in
>>> the same way, so I think this patch is needed.
>>>
>>> Thanks,
>>>
>>> Christophe
>>>
>>>> Christophe?
>>>>
>>>> R.
>> Ok, thanks for checking.  In that case, Saurabh, your patch is OK, but please change 'Fix testcase' to 'Use int32_t instead of int.'
>>
>> Note that ChangeLog entries end with a full stop.
>>
>> R.
>
> Thank you for the feedback. Please find the updated ChangeLog below.
>
> gcc/testsuite/ChangeLog:
>
>          * gcc.target/arm/mve/pr112337.c: Use int32_t instead of int.

Thanks, pushed to trunk.

Richard
  

Patch

diff --git a/gcc/testsuite/gcc.target/arm/mve/pr112337.c b/gcc/testsuite/gcc.target/arm/mve/pr112337.c
index 8f491990088..d1a075ecd0e 100644
--- a/gcc/testsuite/gcc.target/arm/mve/pr112337.c
+++ b/gcc/testsuite/gcc.target/arm/mve/pr112337.c
@@ -5,8 +5,8 @@ 
 #include <arm_mve.h>
 
 void g(int32x4_t);
-void f(int, int, int, short, int *p) {
-  int *bias = p;
+void f(int, int, int, short, int32_t *p) {
+  int32_t *bias = p;
   for (;;) {
     int32x4_t d = vldrwq_s32 (p);
     bias += 4;