aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2024-10-30 09:02:15 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2024-12-13 14:23:32 +0000
commit6aae1658d2c1cb9ef5851324e94d3c2e436f763b (patch)
tree05ab286348e6a69a47005ccd7a31f2b38e8fd2b8 /gcc
parente0c38d6c95439d515081fe3b79a44eebcfdaa610 (diff)
downloadgcc-6aae1658d2c1cb9ef5851324e94d3c2e436f763b.zip
gcc-6aae1658d2c1cb9ef5851324e94d3c2e436f763b.tar.gz
gcc-6aae1658d2c1cb9ef5851324e94d3c2e436f763b.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/arm-mve-builtins-shapes.cc38
-rw-r--r--gcc/config/arm/arm-mve-builtins-shapes.h1
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc
index 28b9045..fa4fee0 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>
}
};
+/* <T0>_t vfoo[_t0](<X>_t, const int)
+
+ where <X> has the same width as <T0> 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)
+
/* <T0>_t vfoo[_t0](<X>_t const *, <Y>_t)
where <X> might be tied to <t0> (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 9113d55..2db323b 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;