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
Subject: [PATCH 08/16] aarch64: Add a VNx1TI mode
Date: Sun, 13 Nov 2022 10:01:38 +0000	[thread overview]
Message-ID: <mptpmdrnpfh.fsf@arm.com> (raw)
In-Reply-To: <mpto7tbp43o.fsf@arm.com> (Richard Sandiford's message of "Sun, 13 Nov 2022 09:59:23 +0000")

Although TI isn't really a native SVE element mode, it's convenient
for SME if we define VNx1TI anyway, so that it can be used to
distinguish .Q ZA operations from others.  It's purely an RTL
convenience and isn't (yet) a valid storage mode.

gcc/
	* config/aarch64/aarch64-modes.def: Add VNx1TI.
---
 gcc/config/aarch64/aarch64-modes.def | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/gcc/config/aarch64/aarch64-modes.def b/gcc/config/aarch64/aarch64-modes.def
index 0fd4c32ad0b..e960b649a6b 100644
--- a/gcc/config/aarch64/aarch64-modes.def
+++ b/gcc/config/aarch64/aarch64-modes.def
@@ -148,7 +148,7 @@ ADV_SIMD_Q_REG_STRUCT_MODES (4, V4x16, V4x8, V4x4, V4x2)
    for 8-bit, 16-bit, 32-bit and 64-bit elements respectively.  It isn't
    strictly necessary to set the alignment here, since the default would
    be clamped to BIGGEST_ALIGNMENT anyhow, but it seems clearer.  */
-#define SVE_MODES(NVECS, VB, VH, VS, VD) \
+#define SVE_MODES(NVECS, VB, VH, VS, VD, VT) \
   VECTOR_MODES_WITH_PREFIX (VNx, INT, 16 * NVECS, NVECS == 1 ? 1 : 4); \
   VECTOR_MODES_WITH_PREFIX (VNx, FLOAT, 16 * NVECS, NVECS == 1 ? 1 : 4); \
   \
@@ -156,6 +156,7 @@ ADV_SIMD_Q_REG_STRUCT_MODES (4, V4x16, V4x8, V4x4, V4x2)
   ADJUST_NUNITS (VH##HI, aarch64_sve_vg * NVECS * 4); \
   ADJUST_NUNITS (VS##SI, aarch64_sve_vg * NVECS * 2); \
   ADJUST_NUNITS (VD##DI, aarch64_sve_vg * NVECS); \
+  ADJUST_NUNITS (VT##TI, exact_div (aarch64_sve_vg * NVECS, 2)); \
   ADJUST_NUNITS (VH##BF, aarch64_sve_vg * NVECS * 4); \
   ADJUST_NUNITS (VH##HF, aarch64_sve_vg * NVECS * 4); \
   ADJUST_NUNITS (VS##SF, aarch64_sve_vg * NVECS * 2); \
@@ -165,17 +166,23 @@ ADV_SIMD_Q_REG_STRUCT_MODES (4, V4x16, V4x8, V4x4, V4x2)
   ADJUST_ALIGNMENT (VH##HI, 16); \
   ADJUST_ALIGNMENT (VS##SI, 16); \
   ADJUST_ALIGNMENT (VD##DI, 16); \
+  ADJUST_ALIGNMENT (VT##TI, 16); \
   ADJUST_ALIGNMENT (VH##BF, 16); \
   ADJUST_ALIGNMENT (VH##HF, 16); \
   ADJUST_ALIGNMENT (VS##SF, 16); \
   ADJUST_ALIGNMENT (VD##DF, 16);
 
-/* Give SVE vectors the names normally used for 256-bit vectors.
-   The actual number depends on command-line flags.  */
-SVE_MODES (1, VNx16, VNx8, VNx4, VNx2)
-SVE_MODES (2, VNx32, VNx16, VNx8, VNx4)
-SVE_MODES (3, VNx48, VNx24, VNx12, VNx6)
-SVE_MODES (4, VNx64, VNx32, VNx16, VNx8)
+/* Give SVE vectors names of the form VNxX, where X describes what is
+   stored in each 128-bit unit.  The actual size of the mode depends
+   on command-line flags.
+
+   VNx1TI isn't really a native SVE mode, but it can be useful in some
+   limited situations.  */
+VECTOR_MODE_WITH_PREFIX (VNx, INT, TI, 1, 1);
+SVE_MODES (1, VNx16, VNx8, VNx4, VNx2, VNx1)
+SVE_MODES (2, VNx32, VNx16, VNx8, VNx4, VNx2)
+SVE_MODES (3, VNx48, VNx24, VNx12, VNx6, VNx3)
+SVE_MODES (4, VNx64, VNx32, VNx16, VNx8, VNx4)
 
 /* Partial SVE vectors:
 
-- 
2.25.1


  parent reply	other threads:[~2022-11-13 10:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13  9:59 [PATCH 00/16] aarch64: Add support for SME Richard Sandiford
2022-11-13  9:59 ` [PATCH 01/16] aarch64: Add arm_streaming(_compatible) attributes Richard Sandiford
2022-11-13 10:00 ` [PATCH 02/16] aarch64: Add +sme Richard Sandiford
2022-11-13 10:00 ` [PATCH 03/16] aarch64: Distinguish streaming-compatible AdvSIMD insns Richard Sandiford
2022-11-13 10:00 ` [PATCH 04/16] aarch64: Mark relevant SVE instructions as non-streaming Richard Sandiford
2022-11-13 10:00 ` [PATCH 05/16] aarch64: Switch PSTATE.SM around calls Richard Sandiford
2022-11-13 10:01 ` [PATCH 06/16] aarch64: Add support for SME ZA attributes Richard Sandiford
2022-11-13 10:01 ` [PATCH 07/16] aarch64: Add a register class for w12-w15 Richard Sandiford
2022-11-13 10:01 ` Richard Sandiford [this message]
2022-11-13 10:01 ` [PATCH 09/16] aarch64: Make AARCH64_FL_SVE requirements explicit Richard Sandiford
2022-11-13 10:02 ` [PATCH 10/16] aarch64: Generalise unspec_based_function_base Richard Sandiford
2022-11-13 10:02 ` [PATCH 11/16] aarch64: Generalise _m rules for SVE intrinsics Richard Sandiford
2022-11-13 10:02 ` [PATCH 12/16] aarch64: Tweaks to function_resolver::resolve_to Richard Sandiford
2022-11-13 10:02 ` [PATCH 13/16] aarch64: Add support for <arm_sme.h> Richard Sandiford
2022-11-13 10:03 ` [PATCH 14/16] aarch64: Add support for arm_locally_streaming Richard Sandiford
2022-11-13 10:03 ` [PATCH 15/16] aarch64: Enforce inlining restrictions for SME Richard Sandiford
2022-11-13 10:03 ` [PATCH 16/16] aarch64: Update sibcall handling " Richard Sandiford

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=mptpmdrnpfh.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).