From: Christophe Lyon Date: Wed, 30 Oct 2024 09:02:15 +0000 (+0000) Subject: arm: [MVE intrinsics] add load_gather_base shape X-Git-Tag: basepoints/gcc-16~3317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aae1658d2c1cb9ef5851324e94d3c2e436f763b;p=thirdparty%2Fgcc.git arm: [MVE intrinsics] add load_gather_base shape This patch adds the load_gather_base shape description. Unlike other load_gather shapes, this one does not support overloaded forms. gcc/ChangeLog: * config/arm/arm-mve-builtins-shapes.cc (struct load_gather_base_def): New. * config/arm/arm-mve-builtins-shapes.h: (load_gather_base): New. --- diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index 28b90454417d..fa4fee072e6d 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -1552,6 +1552,44 @@ struct load_ext_gather : public overloaded_base<0> } }; +/* _t vfoo[_t0](_t, const int) + + where has the same width as but is of unsigned type. + + Example: vldrwq_gather_base + int32x4_t [__arm_]vldrwq_gather_base_s32(uint32x4_t addr, const int offset) + float32x4_t [__arm_]vldrwq_gather_base_z_f32(uint32x4_t addr, const int offset, mve_pred16_t p) */ +struct load_gather_base_def : public nonoverloaded_base +{ + bool + explicit_mode_suffix_p (enum predication_index, enum mode_suffix_index) const override + { + return true; + } + + bool + mode_after_pred () const override + { + return false; + } + + void + build (function_builder &b, const function_group_info &group, + bool preserve_user_namespace) const override + { + build_all (b, "v0,vu0,ss64", group, MODE_none, preserve_user_namespace); + } + + bool + check (function_checker &c) const override + { + unsigned int multiple = c.type_suffix (0).element_bits / 8; + int bound = 127 * multiple; + return c.require_immediate_range_multiple (1, -bound, bound, multiple); + } +}; +SHAPE (load_gather_base) + /* _t vfoo[_t0](_t const *, _t) where might be tied to (for non-extending loads) or might diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h index 9113d55dab43..2db323b56286 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.h +++ b/gcc/config/arm/arm-mve-builtins-shapes.h @@ -64,6 +64,7 @@ namespace arm_mve extern const function_shape *const load; extern const function_shape *const load_ext; extern const function_shape *const load_ext_gather_offset; + extern const function_shape *const load_gather_base; extern const function_shape *const mvn; extern const function_shape *const store; extern const function_shape *const store_scatter_base;