public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 05/11] aarch64, testsuite: Fix up pr103147-10 tests
@ 2023-11-16 18:08 Alex Coplan
  2023-11-21 12:10 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Coplan @ 2023-11-16 18:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Sandiford, Kyrylo Tkachov

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

For the ret function, allow the loads to be emitted in either order in
the codegen.  The order gets inverted with the new load/store pair pass.

OK for trunk?

gcc/testsuite/ChangeLog:

	* g++.target/aarch64/pr103147-10.C (ret): Allow loads in either order.
	* gcc.target/aarch64/pr103147-10.c (ret): Likewise.
---
 gcc/testsuite/g++.target/aarch64/pr103147-10.C | 5 +++++
 gcc/testsuite/gcc.target/aarch64/pr103147-10.c | 5 +++++
 2 files changed, 10 insertions(+)


[-- Attachment #2: 0005-aarch64-testsuite-Fix-up-pr103147-10-tests.patch --]
[-- Type: text/x-patch, Size: 930 bytes --]

diff --git a/gcc/testsuite/g++.target/aarch64/pr103147-10.C b/gcc/testsuite/g++.target/aarch64/pr103147-10.C
index e12771533f7..5a98c30ed3f 100644
--- a/gcc/testsuite/g++.target/aarch64/pr103147-10.C
+++ b/gcc/testsuite/g++.target/aarch64/pr103147-10.C
@@ -62,8 +62,13 @@ ld4 (int32x4x4_t *a, int32_t *b)
 /*
 ** ret:
 **	...
+** (
 **	ldp	q0, q1, \[x0\]
 **	ldr	q2, \[x0, #?32\]
+** |
+**	ldr	q2, \[x0, #?32\]
+**	ldp	q0, q1, \[x0\]
+** )
 **	...
 */
 int32x4x3_t
diff --git a/gcc/testsuite/gcc.target/aarch64/pr103147-10.c b/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
index 57942bfd10a..2609266bc46 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
@@ -60,8 +60,13 @@ ld4 (int32x4x4_t *a, int32_t *b)
 /*
 ** ret:
 **	...
+** (
 **	ldp	q0, q1, \[x0\]
 **	ldr	q2, \[x0, #?32\]
+** |
+**	ldr	q2, \[x0, #?32\]
+**	ldp	q0, q1, \[x0\]
+** )
 **	...
 */
 int32x4x3_t

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 05/11] aarch64, testsuite: Fix up pr103147-10 tests
  2023-11-16 18:08 [PATCH 05/11] aarch64, testsuite: Fix up pr103147-10 tests Alex Coplan
@ 2023-11-21 12:10 ` Richard Sandiford
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2023-11-21 12:10 UTC (permalink / raw)
  To: Alex Coplan; +Cc: gcc-patches, Kyrylo Tkachov

Alex Coplan <alex.coplan@arm.com> writes:
> For the ret function, allow the loads to be emitted in either order in
> the codegen.  The order gets inverted with the new load/store pair pass.
>
> OK for trunk?
>
> gcc/testsuite/ChangeLog:
>
> 	* g++.target/aarch64/pr103147-10.C (ret): Allow loads in either order.

OK, but: would adding -fno-schedule-insns -fno-schedule-insns2
also have worked?  It's usually a good idea to pass those options
to -O2 check-function-bodies tests, if the test checks for insns
that have dependency.

In this case, those options would ensure that nothing else gets
moved between the loads.

So OK as-is, but also OK with the options instead.

Thanks,
Richard

> 	* gcc.target/aarch64/pr103147-10.c (ret): Likewise.
> ---
>  gcc/testsuite/g++.target/aarch64/pr103147-10.C | 5 +++++
>  gcc/testsuite/gcc.target/aarch64/pr103147-10.c | 5 +++++
>  2 files changed, 10 insertions(+)
>
> diff --git a/gcc/testsuite/g++.target/aarch64/pr103147-10.C b/gcc/testsuite/g++.target/aarch64/pr103147-10.C
> index e12771533f7..5a98c30ed3f 100644
> --- a/gcc/testsuite/g++.target/aarch64/pr103147-10.C
> +++ b/gcc/testsuite/g++.target/aarch64/pr103147-10.C
> @@ -62,8 +62,13 @@ ld4 (int32x4x4_t *a, int32_t *b)
>  /*
>  ** ret:
>  **	...
> +** (
>  **	ldp	q0, q1, \[x0\]
>  **	ldr	q2, \[x0, #?32\]
> +** |
> +**	ldr	q2, \[x0, #?32\]
> +**	ldp	q0, q1, \[x0\]
> +** )
>  **	...
>  */
>  int32x4x3_t
> diff --git a/gcc/testsuite/gcc.target/aarch64/pr103147-10.c b/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
> index 57942bfd10a..2609266bc46 100644
> --- a/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
> +++ b/gcc/testsuite/gcc.target/aarch64/pr103147-10.c
> @@ -60,8 +60,13 @@ ld4 (int32x4x4_t *a, int32_t *b)
>  /*
>  ** ret:
>  **	...
> +** (
>  **	ldp	q0, q1, \[x0\]
>  **	ldr	q2, \[x0, #?32\]
> +** |
> +**	ldr	q2, \[x0, #?32\]
> +**	ldp	q0, q1, \[x0\]
> +** )
>  **	...
>  */
>  int32x4x3_t

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-21 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 18:08 [PATCH 05/11] aarch64, testsuite: Fix up pr103147-10 tests Alex Coplan
2023-11-21 12:10 ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).