diff mbox series

aarch64: Alter pr116258.c test to correct for big endian.

Message ID cdb982c7-82d7-4947-9786-b65fcbdc089d@arm.com
State New
Headers show
Series aarch64: Alter pr116258.c test to correct for big endian. | expand

Commit Message

Richard Ball Oct. 10, 2024, 3:44 p.m. UTC
The test at pr116258.c fails on big endian targets,
this is because the test checks that the index of a floating
point multiply is 0, which is correct only for little endian.

gcc/testsuite/ChangeLog:

	PR tree-optimization/116258
	* gcc.target/aarch64/pr116258.c:
	Alter test to add big-endian support.

Comments

Richard Sandiford Oct. 10, 2024, 4:33 p.m. UTC | #1
Richard Ball <richard.ball@arm.com> writes:
> The test at pr116258.c fails on big endian targets,
> this is because the test checks that the index of a floating
> point multiply is 0, which is correct only for little endian.
>
> gcc/testsuite/ChangeLog:
>
> 	PR tree-optimization/116258
> 	* gcc.target/aarch64/pr116258.c:
> 	Alter test to add big-endian support.

OK, thanks.

Richard

>
> diff --git a/gcc/testsuite/gcc.target/aarch64/pr116258.c b/gcc/testsuite/gcc.target/aarch64/pr116258.c
> index e727ad4b72a5b8fe86e295d6e695d46203cd082e..5b63de25b7bf6dfd5f7b71cefcb27cabb42ac99e 100644
> --- a/gcc/testsuite/gcc.target/aarch64/pr116258.c
> +++ b/gcc/testsuite/gcc.target/aarch64/pr116258.c
> @@ -12,6 +12,7 @@
>    return (x + h(t));
>  }
>  
> -/* { dg-final { scan-assembler-times "\\\[0\\\]" 1 } } */
> +/* { dg-final { scan-assembler-times "\\\[0\\\]" 1 { target { aarch64_little_endian } } } } */
> +/* { dg-final { scan-assembler-times "\\\[3\\\]" 1 { target { aarch64_big_endian } } } } */
>  /* { dg-final { scan-assembler-not "dup\t" } } */
>  /* { dg-final { scan-assembler-not "ins\t" } } */
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/pr116258.c b/gcc/testsuite/gcc.target/aarch64/pr116258.c
index e727ad4b72a5b8fe86e295d6e695d46203cd082e..5b63de25b7bf6dfd5f7b71cefcb27cabb42ac99e 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr116258.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr116258.c
@@ -12,6 +12,7 @@ 
   return (x + h(t));
 }
 
-/* { dg-final { scan-assembler-times "\\\[0\\\]" 1 } } */
+/* { dg-final { scan-assembler-times "\\\[0\\\]" 1 { target { aarch64_little_endian } } } } */
+/* { dg-final { scan-assembler-times "\\\[3\\\]" 1 { target { aarch64_big_endian } } } } */
 /* { dg-final { scan-assembler-not "dup\t" } } */
 /* { dg-final { scan-assembler-not "ins\t" } } */