diff options
author | Christophe Lyon <christophe.lyon@arm.com> | 2023-02-21 22:30:25 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@arm.com> | 2023-05-11 21:04:09 +0200 |
commit | 93597d92189cfe57a4e30b585492e957bf048969 (patch) | |
tree | b74baeaef2f9fcd7e33603395596348da49d82e3 | |
parent | 2d1a5a441e1f1901ed0922fcf149f2f7cedd85a8 (diff) | |
download | gcc-93597d92189cfe57a4e30b585492e957bf048969.tar.gz |
arm: [MVE intrinsics] add binary_acc_int32 shape
This patch adds the binary_acc_int32 shape description.
2022-10-25 Christophe Lyon <christophe.lyon@arm.com>
gcc/
* config/arm/arm-mve-builtins-shapes.cc (binary_acc_int32): New.
* config/arm/arm-mve-builtins-shapes.h (binary_acc_int32): New.
-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 a7faf8299cb..e491c810b40 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -365,6 +365,33 @@ struct binary_def : public overloaded_base<0> }; SHAPE (binary) +/* <[u]int32>_t vfoo[_<t0>](<T0>_t, <T0>_t) + + i.e. the shape for binary operations that operate on a pair of + vectors and produce an int32_t or an uint32_t depending on the + signedness of the input elements. + + Example: vmladavq. + int32_t [__arm_]vmladavq[_s16](int16x8_t m1, int16x8_t m2) + int32_t [__arm_]vmladavq_p[_s16](int16x8_t m1, int16x8_t m2, mve_pred16_t p) */ +struct binary_acc_int32_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, "sx32,v0,v0", group, MODE_none, preserve_user_namespace); + } + + tree + resolve (function_resolver &r) const override + { + return r.resolve_uniform (2); + } +}; +SHAPE (binary_acc_int32) + /* <T0>_t vfoo[_n_t0](<T0>_t, const int) Shape for vector shift right operations that take a vector first diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index 46cc26ef918..9e877c9591a 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -37,6 +37,7 @@ namespace arm_mve extern const function_shape *const binary; extern const function_shape *const binary_lshift; extern const function_shape *const binary_lshift_r; + extern const function_shape *const binary_acc_int32; extern const function_shape *const binary_maxamina; extern const function_shape *const binary_maxavminav; extern const function_shape *const binary_maxvminv; |