From: Christophe Lyon <christophe.lyon@arm.com>
To: <gcc-patches@gcc.gnu.org>, <kyrylo.tkachov@arm.com>,
<richard.earnshaw@arm.com>, <richard.sandiford@arm.com>
Cc: Christophe Lyon <christophe.lyon@arm.com>
Subject: [PATCH 01/10] arm: [MVE intrinsics] add unary shape
Date: Fri, 5 May 2023 18:48:57 +0200 [thread overview]
Message-ID: <20230505164906.596219-1-christophe.lyon@arm.com> (raw)
This patch adds the unary shape description.
2022-09-08 Christophe Lyon <christophe.lyon@arm.com>
gcc/
* config/arm/arm-mve-builtins-shapes.cc (unary): New.
* config/arm/arm-mve-builtins-shapes.h (unary): New.
---
gcc/config/arm/arm-mve-builtins-shapes.cc | 27 +++++++++++++++++++++++
gcc/config/arm/arm-mve-builtins-shapes.h | 1 +
2 files changed, 28 insertions(+)
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc
index 7078f7d7220..7d39cf79aec 100644
--- a/gcc/config/arm/arm-mve-builtins-shapes.cc
+++ b/gcc/config/arm/arm-mve-builtins-shapes.cc
@@ -786,6 +786,33 @@ struct inherent_def : public nonoverloaded_base
};
SHAPE (inherent)
+/* <T0>_t vfoo[_t0](<T0>_t)
+
+ i.e. the standard shape for unary operations that operate on
+ uniform types.
+
+ Example: vabsq.
+ int8x16_t [__arm_]vabsq[_s8](int8x16_t a)
+ int8x16_t [__arm_]vabsq_m[_s8](int8x16_t inactive, int8x16_t a, mve_pred16_t p)
+ int8x16_t [__arm_]vabsq_x[_s8](int8x16_t a, mve_pred16_t p) */
+struct unary_def : public overloaded_base<0>
+{
+ void
+ build (function_builder &b, const function_group_info &group,
+ bool preserve_user_namespace) const override
+ {
+ b.add_overloaded_functions (group, MODE_none, preserve_user_namespace);
+ build_all (b, "v0,v0", group, MODE_none, preserve_user_namespace);
+ }
+
+ tree
+ resolve (function_resolver &r) const override
+ {
+ return r.resolve_unary ();
+ }
+};
+SHAPE (unary)
+
/* <T0>_t foo_t0[_t1](<T1>_t)
where the target type <t0> must be specified explicitly but the source
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h
index 09e00b69e63..bd7e11b89f6 100644
--- a/gcc/config/arm/arm-mve-builtins-shapes.h
+++ b/gcc/config/arm/arm-mve-builtins-shapes.h
@@ -45,6 +45,7 @@ namespace arm_mve
extern const function_shape *const binary_rshift_narrow_unsigned;
extern const function_shape *const create;
extern const function_shape *const inherent;
+ extern const function_shape *const unary;
extern const function_shape *const unary_convert;
} /* end namespace arm_mve::shapes */
--
2.34.1
next reply other threads:[~2023-05-05 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 16:48 Christophe Lyon [this message]
2023-05-05 16:48 ` [PATCH 02/10] arm: [MVE intrinsics] factorize several unary operations Christophe Lyon
2023-05-05 16:48 ` [PATCH 03/10] arm: [MVE intrinsics] rework vabsq vnegq vclsq vclzq, vqabsq, vqnegq Christophe Lyon
2023-05-05 16:49 ` [PATCH 04/10] arm: [MVE intrinsics] rework vrndq vrndaq vrndmq vrndnq vrndpq vrndxq Christophe Lyon
2023-05-05 16:49 ` [PATCH 05/10] arm: [MVE intrinsics] add binary_move_narrow and binary_move_narrow_unsigned shapes Christophe Lyon
2023-05-05 16:49 ` [PATCH 06/10] arm: [MVE intrinsics] factorize vmovnbq vmovntq vqmovnbq vqmovntq vqmovunbq vqmovuntq Christophe Lyon
2023-05-05 16:49 ` [PATCH 07/10] arm: [MVE intrinsics] rework " Christophe Lyon
2023-05-05 16:49 ` [PATCH 08/10] arm: [MVE intrinsics] add binary_widen_n shape Christophe Lyon
2023-05-05 16:49 ` [PATCH 09/10] arm: [MVE intrinsics] factorize vshllbq vshlltq Christophe Lyon
2023-05-05 16:49 ` [PATCH 10/10] arm: [MVE intrinsics] rework " Christophe Lyon
2023-05-09 8:25 ` [PATCH 01/10] arm: [MVE intrinsics] add unary shape Kyrylo Tkachov
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=20230505164906.596219-1-christophe.lyon@arm.com \
--to=christophe.lyon@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
--cc=richard.earnshaw@arm.com \
--cc=richard.sandiford@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).