public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: kyrylo.tkachov@arm.com
Subject: [PATCH] aarch64: Allow moves after tied-register intrinsics (2nd edition)
Date: Tue, 16 May 2023 11:53:32 +0100	[thread overview]
Message-ID: <mptleho1r9v.fsf@arm.com> (raw)

I missed these two in g:4ff89f10ca0d41f9cfa76 because I was
testing on a system that didn't support big-endian compilation.
Testing on aarch64_be-elf shows no other related failures
(although the overall results are worse than for little-endian).

Tested on aarch64_be-elf & pushed.

Richard


gcc/testsuite/
	* gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c: Allow mves
	to occur after the intrinsic instruction, rather than requiring
	them to happen before.
	* gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c: Likewise.
---
 .../gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c    | 10 ++++++++++
 .../gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c   | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
index ae0a953f7b4..9975edb8fdb 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bfdot-2.c
@@ -70,8 +70,13 @@ float32x4_t ufooq_lane(float32x4_t r, bfloat16x8_t x, bfloat16x4_t y)
 
 /*
 **ufoo_untied:
+** (
 **	mov	v0.8b, v1.8b
 **	bfdot	v0.2s, (v2.4h, v3.4h|v3.4h, v2.4h)
+** |
+**	bfdot	v1.2s, (v2.4h, v3.4h|v3.4h, v2.4h)
+**	mov	v0.8b, v1.8b
+** )
 **	ret
 */
 float32x2_t ufoo_untied(float32x4_t unused, float32x2_t r, bfloat16x4_t x, bfloat16x4_t y)
@@ -81,8 +86,13 @@ float32x2_t ufoo_untied(float32x4_t unused, float32x2_t r, bfloat16x4_t x, bfloa
 
 /*
 **ufooq_lane_untied:
+** (
 **	mov	v0.16b, v1.16b
 **	bfdot	v0.4s, v2.8h, v3.2h\[1\]
+** |
+**	bfdot	v1.4s, v2.8h, v3.2h\[1\]
+**	mov	v0.16b, v1.16b
+** )
 **	ret
 */
 float32x4_t ufooq_lane_untied(float32x4_t unused, float32x4_t r, bfloat16x8_t x, bfloat16x4_t y)
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
index 61c7c51f5ec..76787f6bedd 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vdot-3-2.c
@@ -115,8 +115,13 @@ int32x4_t sfooq_laneq (int32x4_t r, int8x16_t x, uint8x16_t y)
 
 /*
 **ufoo_untied:
+** (
 **	mov	v0\.8b, v1\.8b
 **	usdot	v0\.2s, v2\.8b, v3\.8b
+** |
+**	usdot	v1\.2s, v2\.8b, v3\.8b
+**	mov	v0\.8b, v1\.8b
+** )
 **	ret
 */
 int32x2_t ufoo_untied (int32x2_t unused, int32x2_t r, uint8x8_t x, int8x8_t y)
@@ -126,8 +131,13 @@ int32x2_t ufoo_untied (int32x2_t unused, int32x2_t r, uint8x8_t x, int8x8_t y)
 
 /*
 **ufooq_laneq_untied:
+** (
 **	mov	v0\.16b, v1\.16b
 **	usdot	v0\.4s, v2\.16b, v3\.4b\[3\]
+** |
+**	usdot	v1\.4s, v2\.16b, v3\.4b\[3\]
+**	mov	v0\.16b, v1\.16b
+** )
 **	ret
 */
 int32x4_t ufooq_laneq_untied (int32x2_t unused, int32x4_t r, uint8x16_t x, int8x16_t y)
-- 
2.25.1


                 reply	other threads:[~2023-05-16 10:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mptleho1r9v.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).