testsuite: aarch64: Fix failing SVE tests on big endian

Richard Sandiford richard.sandiford@arm.com
Thu Jul 15 19:48:26 GMT 2021


Jonathan Wright via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Hi,
>
> A recent change "gcc: Add vec_select -> subreg RTL simplification"
> updated the expected test results for SVE extraction tests. The new
> result should only have been changed for little endian. This patch
> restores the old expected result for big endian.
>
> Ok for master?

OK, thanks.

Richard

> Thanks,
> Jonathan
>
> ---
>
> gcc/testsuite/ChangeLog:
>
> 2021-07-15  Jonathan Wright  <jonathan.wright@arm.com>
>
> 	* gcc.target/aarch64/sve/extract_1.c: Split expected results
> 	by big/little endian targets, restoring the old expected
> 	result for big endian.
> 	* gcc.target/aarch64/sve/extract_2.c: Likewise.
> 	* gcc.target/aarch64/sve/extract_3.c: Likewise.
> 	* gcc.target/aarch64/sve/extract_4.c: Likewise.
>
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/extract_1.c b/gcc/testsuite/gcc.target/aarch64/sve/extract_1.c
> index 1a926dbb76fb42ab4bcfa18922fdbb2366d04e6e..7d76c98e92545817f6544d1b131cdbbd800c46ab 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/extract_1.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/extract_1.c
> @@ -56,7 +56,10 @@ typedef _Float16 vnx8hf __attribute__((vector_size (32)));
>  
>  TEST_ALL (EXTRACT)
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 2 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 2 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\td[0-9]+, v[0-9]+\.d\[0\]\n} } } */
>  /* { dg-final { scan-assembler-times {\tdup\td[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
> @@ -64,7 +67,10 @@ TEST_ALL (EXTRACT)
>  /* { dg-final { scan-assembler-times {\tlastb\tx[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tlastb\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tw[0-9]+, s[0-9]\n} 2 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, s[0-9]\n} 2 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.s\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[3\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\ts[0-9]+, v[0-9]+\.s\[0\]\n} } } */
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/extract_2.c b/gcc/testsuite/gcc.target/aarch64/sve/extract_2.c
> index 1c54d10cd348f8c81b6369b7b180e30580c8988d..a2644ceae68235175ff787d1d9cbece83985dc5f 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/extract_2.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/extract_2.c
> @@ -56,7 +56,10 @@ typedef _Float16 vnx16hf __attribute__((vector_size (64)));
>  
>  TEST_ALL (EXTRACT)
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 2 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 2 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\td[0-9]+, v[0-9]+\.d\[0\]\n} } } */
>  /* { dg-final { scan-assembler-times {\tdup\td[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
> @@ -64,7 +67,10 @@ TEST_ALL (EXTRACT)
>  /* { dg-final { scan-assembler-times {\tlastb\tx[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tlastb\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tw[0-9]+, s[0-9]\n} 2 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, s[0-9]\n} 2 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.s\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[3\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\ts[0-9]+, v[0-9]+\.s\[0\]\n} } } */
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/extract_3.c b/gcc/testsuite/gcc.target/aarch64/sve/extract_3.c
> index 501b9f3027128d3297ef77694f6dbcf1fb4d9824..baa54594c482253b1e0aae2b62a342edea0369e9 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/extract_3.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/extract_3.c
> @@ -77,7 +77,10 @@ typedef _Float16 vnx32hf __attribute__((vector_size (128)));
>  
>  TEST_ALL (EXTRACT)
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 5 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 5 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\td[0-9]+, v[0-9]+\.d\[0\]\n} } } */
>  /* { dg-final { scan-assembler-times {\tdup\td[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
> @@ -86,7 +89,10 @@ TEST_ALL (EXTRACT)
>  /* { dg-final { scan-assembler-times {\tlastb\tx[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tlastb\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tw[0-9]+, s[0-9]\n} 5 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, s[0-9]\n} 5 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.s\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[3\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\ts[0-9]+, v[0-9]+\.s\[0\]\n} } } */
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve/extract_4.c b/gcc/testsuite/gcc.target/aarch64/sve/extract_4.c
> index 94d31554b0a41822cb472522948d8a3bb0765f1e..aa6fe482dbfdc3b2fa54473523cc0efd467a64de 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve/extract_4.c
> +++ b/gcc/testsuite/gcc.target/aarch64/sve/extract_4.c
> @@ -84,7 +84,10 @@ typedef _Float16 v128hf __attribute__((vector_size (256)));
>  
>  TEST_ALL (EXTRACT)
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 6 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, d[0-9]\n} 6 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\td[0-9]+, v[0-9]+\.d\[0\]\n} } } */
>  /* { dg-final { scan-assembler-times {\tdup\td[0-9]+, v[0-9]+\.d\[1\]\n} 1 } } */
> @@ -93,7 +96,10 @@ TEST_ALL (EXTRACT)
>  /* { dg-final { scan-assembler-times {\tlastb\tx[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tlastb\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
>  
> -/* { dg-final { scan-assembler-times {\tfmov\tw[0-9]+, s[0-9]\n} 6 } } */
> +/* { dg-final { scan-assembler-times {\tfmov\tx[0-9]+, s[0-9]\n} 6 {
> +		target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times {\tumov\tx[0-9]+, v[0-9]+\.s\[0\]\n} 1 {
> +		target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[1\]\n} 1 } } */
>  /* { dg-final { scan-assembler-times {\tumov\tw[0-9]+, v[0-9]+\.s\[3\]\n} 1 } } */
>  /* { dg-final { scan-assembler-not {\tdup\ts[0-9]+, v[0-9]+\.s\[0\]\n} } } */


More information about the Gcc-patches mailing list