diff options
author | Christophe Lyon <christophe.lyon@arm.com> | 2023-02-09 18:38:22 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@arm.com> | 2023-05-09 13:07:41 +0200 |
commit | 89567b1ff2d207289ba3a83b8ffdacc600545429 (patch) | |
tree | 08aab91469fb7735a24fcd9c2d480ac6d80495e8 /gcc | |
parent | e24b74fc43b63ed6bfca265f98f681dca60a5c97 (diff) | |
download | gcc-89567b1ff2d207289ba3a83b8ffdacc600545429.zip gcc-89567b1ff2d207289ba3a83b8ffdacc600545429.tar.gz gcc-89567b1ff2d207289ba3a83b8ffdacc600545429.tar.bz2 |
arm: [MVE intrinsics] add unary shape
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm-mve-builtins-shapes.cc | 27 | ||||
-rw-r--r-- | gcc/config/arm/arm-mve-builtins-shapes.h | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 7078f7d..7d39cf7 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 09e00b6..bd7e11b 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 */ |