> -----Original Message----- > From: Christophe Lyon <christophe.l...@arm.com> > Sent: Wednesday, May 10, 2023 2:31 PM > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <kyrylo.tkac...@arm.com>; > Richard Earnshaw <richard.earns...@arm.com>; Richard Sandiford > <richard.sandif...@arm.com> > Cc: Christophe Lyon <christophe.l...@arm.com> > Subject: [PATCH 15/20] arm: [MVE intrinsics] add unary_acc shape > > This patch adds the unary_acc shape description. > > 2022-10-25 Christophe Lyon <christophe.l...@arm.com> > > gcc/ > * config/arm/arm-mve-builtins-shapes.cc (unary_acc): New. > * config/arm/arm-mve-builtins-shapes.h (unary_acc): New. > --- > gcc/config/arm/arm-mve-builtins-shapes.cc | 28 +++++++++++++++++++++++ > gcc/config/arm/arm-mve-builtins-shapes.h | 1 + > 2 files changed, 29 insertions(+) > > diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm- > mve-builtins-shapes.cc > index bff1c3e843b..e77a0cc20ac 100644 > --- a/gcc/config/arm/arm-mve-builtins-shapes.cc > +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc > @@ -1066,6 +1066,34 @@ struct unary_def : public overloaded_base<0> > }; > SHAPE (unary) > > +/* <S0:twice>_t vfoo[_<t0>](<T0>_t) > + > + i.e. a version of "unary" in which the source elements are half the > + size of the destination scalar, but have the same type class. > + > + Example: vaddlvq. > + int64_t [__arm_]vaddlvq[_s32](int32x4_t a) > + int64_t [__arm_]vaddlvq_p[_s32](int32x4_t a, mve_pred16_t p) */ > +struct unary_acc_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, "sw0,v0", group, MODE_none, preserve_user_namespace); > + } > + > + tree > + resolve (function_resolver &r) const override > + { > + /* FIXME: check that the return value is actually > + twice as wide as arg 0. */ Any reason why we can't add that check now? I'd rather not add new FIXMEs here... Thanks, Kyrill > + return r.resolve_unary (); > + } > +}; > +SHAPE (unary_acc) > + > /* <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 fc1bacbd4da..c062fe624c4 100644 > --- a/gcc/config/arm/arm-mve-builtins-shapes.h > +++ b/gcc/config/arm/arm-mve-builtins-shapes.h > @@ -53,6 +53,7 @@ namespace arm_mve > extern const function_shape *const create; > extern const function_shape *const inherent; > extern const function_shape *const unary; > + extern const function_shape *const unary_acc; > extern const function_shape *const unary_convert; > extern const function_shape *const unary_int32; > extern const function_shape *const unary_int32_acc; > -- > 2.34.1
RE: [PATCH 15/20] arm: [MVE intrinsics] add unary_acc shape
Kyrylo Tkachov via Gcc-patches Wed, 10 May 2023 07:52:46 -0700
- [PATCH 01/20] arm: [MVE intrinsics] fact... Christophe Lyon via Gcc-patches
- [PATCH 11/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 09/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 06/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 04/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 20/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 15/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- RE: [PATCH 15/20] arm: [MVE int... Kyrylo Tkachov via Gcc-patches
- Re: [PATCH 15/20] arm: [MVE... Christophe Lyon via Gcc-patches
- RE: [PATCH 15/20] arm: ... Kyrylo Tkachov via Gcc-patches
- Re: [PATCH 15/20] ... Christophe Lyon via Gcc-patches
- Re: [PATCH 15/20] arm: ... Richard Sandiford via Gcc-patches
- Re: [PATCH 15/20] ... Christophe Lyon via Gcc-patches
- Re: [PATCH 15/... Richard Sandiford via Gcc-patches
- [PATCH 07/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 14/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 10/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches
- [PATCH 16/20] arm: [MVE intrinsics]... Christophe Lyon via Gcc-patches