testsuite: aarch64: Adjust SVE ACLE tests to new generated code

Message ID 20230824025706.192064-1-thiago.bauermann@linaro.org
State Accepted
Headers
Series testsuite: aarch64: Adjust SVE ACLE tests to new generated code |

Checks

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

Commit Message

Thiago Jung Bauermann Aug. 24, 2023, 2:57 a.m. UTC
  Since commit e7a36e4715c7 "[PATCH] RISC-V: Support simplify (-1-x) for
vector." these tests fail on aarch64-linux:

		=== g++ tests ===

Running g++:g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m

		=== gcc tests ===

Running gcc:gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m

Andrew Pinski's analysis in PR testsuite/111071 is that the new code is
better and the testcase should be updated. I also asked Prathamesh Kulkarni
in private and he agreed.

Here is the update. With this change, all tests in
gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp pass on aarch64-linux.

gcc/testsuite/
	PR testsuite/111071
	* gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c: Adjust to new code.
	* gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c: Likewise.

Suggested-by: Andrew Pinski <apinski@marvell.com>
---
 gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c | 3 +--
 gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
  

Comments

Prathamesh Kulkarni Aug. 24, 2023, 3:47 p.m. UTC | #1
On Thu, 24 Aug 2023 at 08:27, Thiago Jung Bauermann
<thiago.bauermann@linaro.org> wrote:
>
> Since commit e7a36e4715c7 "[PATCH] RISC-V: Support simplify (-1-x) for
> vector." these tests fail on aarch64-linux:
>
>                 === g++ tests ===
>
> Running g++:g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m
>
>                 === gcc tests ===
>
> Running gcc:gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m
>
> Andrew Pinski's analysis in PR testsuite/111071 is that the new code is
> better and the testcase should be updated. I also asked Prathamesh Kulkarni
> in private and he agreed.
>
> Here is the update. With this change, all tests in
> gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp pass on aarch64-linux.
>
> gcc/testsuite/
>         PR testsuite/111071
>         * gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c: Adjust to new code.
>         * gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c: Likewise.
>
> Suggested-by: Andrew Pinski <apinski@marvell.com>
> ---
>  gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c | 3 +--
>  gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
Hi Thiago,
The patch looks OK to me, but can't approve.

Thanks,
Prathamesh
>
> 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 b9615de6655f..3e521bc9ae32 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,
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
> index 65606b6dda03..4922bdbacc47 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
> @@ -76,8 +76,7 @@ TEST_UNIFORM_Z (subr_1_u8_m_untied, svuint8_t,
>
>  /*
>  ** subr_m1_u8_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_u8_m, svuint8_t,
  
Richard Sandiford Sept. 4, 2023, 6:58 p.m. UTC | #2
Thiago Jung Bauermann via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Since commit e7a36e4715c7 "[PATCH] RISC-V: Support simplify (-1-x) for
> vector." these tests fail on aarch64-linux:
>
> 		=== g++ tests ===
>
> Running g++:g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m
>
> 		=== gcc tests ===
>
> Running gcc:gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m
>
> Andrew Pinski's analysis in PR testsuite/111071 is that the new code is
> better and the testcase should be updated. I also asked Prathamesh Kulkarni
> in private and he agreed.
>
> Here is the update. With this change, all tests in
> gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp pass on aarch64-linux.
>
> gcc/testsuite/
> 	PR testsuite/111071
> 	* gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c: Adjust to new code.
> 	* gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c: Likewise.

Thanks, pushed to trunk.  And sorry for the delay.  I somehow
missed this earlier. :(

Richard

> Suggested-by: Andrew Pinski <apinski@marvell.com>
> ---
>  gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c | 3 +--
>  gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c | 3 +--
>  2 files changed, 2 insertions(+), 4 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 b9615de6655f..3e521bc9ae32 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,
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
> index 65606b6dda03..4922bdbacc47 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
> @@ -76,8 +76,7 @@ TEST_UNIFORM_Z (subr_1_u8_m_untied, svuint8_t,
>  
>  /*
>  ** subr_m1_u8_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_u8_m, svuint8_t,
  
Thiago Jung Bauermann Sept. 4, 2023, 8:48 p.m. UTC | #3
Hello Richard,

Richard Sandiford <richard.sandiford@arm.com> writes:

> Thiago Jung Bauermann via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>> Since commit e7a36e4715c7 "[PATCH] RISC-V: Support simplify (-1-x) for
>> vector." these tests fail on aarch64-linux:
>>
>> 		=== g++ tests ===
>>
>> Running g++:g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m
>>
>> 		=== gcc tests ===
>>
>> Running gcc:gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_s8_m
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_s8_m
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies subr_m1_u8_m
>> FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2 -fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS  check-function-bodies subr_m1_u8_m
>>
>> Andrew Pinski's analysis in PR testsuite/111071 is that the new code is
>> better and the testcase should be updated. I also asked Prathamesh Kulkarni
>> in private and he agreed.
>>
>> Here is the update. With this change, all tests in
>> gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp pass on aarch64-linux.
>>
>> gcc/testsuite/
>> 	PR testsuite/111071
>> 	* gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_s8.c: Adjust to new code.
>> 	* gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c: Likewise.
>
> Thanks, pushed to trunk.  And sorry for the delay.  I somehow
> missed this earlier. :(

No problem. Thank you for pushing it!
  

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 b9615de6655f..3e521bc9ae32 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,
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
index 65606b6dda03..4922bdbacc47 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/subr_u8.c
@@ -76,8 +76,7 @@  TEST_UNIFORM_Z (subr_1_u8_m_untied, svuint8_t,
 
 /*
 ** subr_m1_u8_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_u8_m, svuint8_t,