From: Christophe Lyon Date: Tue, 21 Feb 2023 22:30:25 +0000 (+0000) Subject: arm: [MVE intrinsics] add binary_acc_int32 shape X-Git-Tag: basepoints/gcc-15~9422 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93597d92189cfe57a4e30b585492e957bf048969;p=thirdparty%2Fgcc.git arm: [MVE intrinsics] add binary_acc_int32 shape This patch adds the binary_acc_int32 shape description. 2022-10-25 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_acc_int32): New. * config/arm/arm-mve-builtins-shapes.h (binary_acc_int32): New. --- diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index a7faf8299cbc..e491c810b405 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[_](_t, _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) + /* _t vfoo[_n_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 46cc26ef918a..9e877c9591aa 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;