Bug 111071: fix the subr with -1 to not due to the simplify.

Message ID 20230830011256.1898667-1-yanzhang.wang@intel.com
State Accepted
Headers
Series Bug 111071: fix the subr with -1 to not due to the simplify. |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Li, Pan2 via Gcc-patches Aug. 30, 2023, 1:09 a.m. UTC
  From: Yanzhang Wang <yanzhang.wang@intel.com>

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/sve/acle/asm/subr_s8.c: Modify subr with -1
    to not.

Signed-off-by: Yanzhang Wang <yanzhang.wang@intel.com>
---

Tested on my local arm environment and passed. Thanks Andrew Pinski's comment
the code is the same with that.

 gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Richard Sandiford Sept. 4, 2023, 3:21 p.m. UTC | #1
"yanzhang.wang--- via Gcc-patches" <gcc-patches@gcc.gnu.org> writes:
> From: Yanzhang Wang <yanzhang.wang@intel.com>
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/aarch64/sve/acle/asm/subr_s8.c: Modify subr with -1
>     to not.
>
> Signed-off-by: Yanzhang Wang <yanzhang.wang@intel.com>
> ---
>
> Tested on my local arm environment and passed. Thanks Andrew Pinski's comment
> the code is the same with that.
>
>  gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
> index b9615de6655..1cf6916a5e0 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
> @@ -76,8 +76,7 @@ TEST_UNIFORM_Z (subr_1_s8_m_untied, svint8_t,
>  
>  /*
>  ** subr_m1_s8_m:
> -**	mov	(z[0-9]+\.b), #-1
> -**	subr	z0\.b, p0/m, z0\.b, \1
> +**	not	z0.b, p0/m, z0.b
>  **	ret
>  */
>  TEST_UNIFORM_Z (subr_m1_s8_m, svint8_t,

I think we need this for subr_u8.c too.  OK with that change,
and thanks for the fix!

Richard
  
Richard Sandiford Sept. 4, 2023, 6:59 p.m. UTC | #2
Richard Sandiford <richard.sandiford@arm.com> writes:
> "yanzhang.wang--- via Gcc-patches" <gcc-patches@gcc.gnu.org> writes:
>> From: Yanzhang Wang <yanzhang.wang@intel.com>
>>
>> gcc/testsuite/ChangeLog:
>>
>> 	* gcc.target/aarch64/sve/acle/asm/subr_s8.c: Modify subr with -1
>>     to not.
>>
>> Signed-off-by: Yanzhang Wang <yanzhang.wang@intel.com>
>> ---
>>
>> Tested on my local arm environment and passed. Thanks Andrew Pinski's comment
>> the code is the same with that.
>>
>>  gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
>> index b9615de6655..1cf6916a5e0 100644
>> --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
>> +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
>> @@ -76,8 +76,7 @@ TEST_UNIFORM_Z (subr_1_s8_m_untied, svint8_t,
>>  
>>  /*
>>  ** subr_m1_s8_m:
>> -**	mov	(z[0-9]+\.b), #-1
>> -**	subr	z0\.b, p0/m, z0\.b, \1
>> +**	not	z0.b, p0/m, z0.b
>>  **	ret
>>  */
>>  TEST_UNIFORM_Z (subr_m1_s8_m, svint8_t,
>
> I think we need this for subr_u8.c too.  OK with that change,
> and thanks for the fix!

Actually, never mind.  I just saw a patch from Thiago Jung Bauerman
for the same issue, which is now in trunk.  Sorry for the confusion,
and thanks again for posting the fix.

Richard
  

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
index b9615de6655..1cf6916a5e0 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c
@@ -76,8 +76,7 @@  TEST_UNIFORM_Z (subr_1_s8_m_untied, svint8_t,
 
 /*
 ** subr_m1_s8_m:
-**	mov	(z[0-9]+\.b), #-1
-**	subr	z0\.b, p0/m, z0\.b, \1
+**	not	z0.b, p0/m, z0.b
 **	ret
 */
 TEST_UNIFORM_Z (subr_m1_s8_m, svint8_t,