aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlfie Richards <Alfie.Richards@arm.com>2024-09-11 12:32:06 +0200
committerChristophe Lyon <christophe.lyon@arm.com>2024-10-29 10:03:06 +0100
commitc31cdc3d85e365ce0d233fe40bee40a8bd672b11 (patch)
treef085ad8c7398242e887983b21a479c8ad253d241 /gcc
parent3aca5aa0f09e7b9f174c4ed3461612a0d0f002d0 (diff)
downloadgcc-c31cdc3d85e365ce0d233fe40bee40a8bd672b11.zip
gcc-c31cdc3d85e365ce0d233fe40bee40a8bd672b11.tar.gz
gcc-c31cdc3d85e365ce0d233fe40bee40a8bd672b11.tar.bz2
arm: [MVE intrinsics] Add load_ext intrinsic shape
This patch adds the extending load shape. It also adds/fixes comments for the load and store shapes. 2024-09-11 Alfie Richards <Alfie.Richards@arm.com> Christophe Lyon <christophe.lyon@arm.com> gcc/ * config/arm/arm-mve-builtins-shapes.cc: (load_ext): New. * config/arm/arm-mve-builtins-shapes.h: (load_ext): New.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/arm-mve-builtins-shapes.cc30
-rw-r--r--gcc/config/arm/arm-mve-builtins-shapes.h1
2 files changed, 28 insertions, 3 deletions
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc
index 0a108cf..12e6212 100644
--- a/gcc/config/arm/arm-mve-builtins-shapes.cc
+++ b/gcc/config/arm/arm-mve-builtins-shapes.cc
@@ -1461,7 +1461,9 @@ struct inherent_def : public nonoverloaded_base
};
SHAPE (inherent)
-/* sv<t0>_t svfoo[_t0](const <t0>_t *)
+/* <T0>_t vfoo[_t0](const <s0>_t *)
+
+ where <s0> is the scalar name of <T0>.
Example: vld1q.
int8x16_t [__arm_]vld1q[_s8](int8_t const *base)
@@ -1493,6 +1495,24 @@ struct load_def : public overloaded_base<0>
};
SHAPE (load)
+/* <T0>_t foo_t0 (const <X>_t *)
+
+ where <X> is determined by the function base name.
+
+ Example: vldrq.
+ int32x4_t [__arm_]vldrwq_s32 (int32_t const *base)
+ uint32x4_t [__arm_]vldrhq_z_u32 (uint16_t const *base, mve_pred16_t p) */
+struct load_ext_def : public nonoverloaded_base
+{
+ void
+ build (function_builder &b, const function_group_info &group,
+ bool preserve_user_namespace) const override
+ {
+ build_all (b, "t0,al", group, MODE_none, preserve_user_namespace);
+ }
+};
+SHAPE (load_ext)
+
/* <T0>_t vfoo[_t0](<T0>_t)
<T0>_t vfoo_n_t0(<sT0>_t)
@@ -1542,14 +1562,18 @@ struct mvn_def : public overloaded_base<0>
};
SHAPE (mvn)
-/* void vfoo[_t0](<X>_t *, v<t0>[xN]_t)
+/* void vfoo[_t0](<X>_t *, <T0>[xN]_t)
where <X> might be tied to <t0> (for non-truncating stores) or might
depend on the function base name (for truncating stores).
Example: vst1q.
void [__arm_]vst1q[_s8](int8_t *base, int8x16_t value)
- void [__arm_]vst1q_p[_s8](int8_t *base, int8x16_t value, mve_pred16_t p) */
+ void [__arm_]vst1q_p[_s8](int8_t *base, int8x16_t value, mve_pred16_t p)
+
+ Example: vstrb.
+ void [__arm_]vstrbq[_s16](int8_t *base, int16x8_t value)
+ void [__arm_]vstrbq_p[_s16](int8_t *base, int16x8_t value, mve_pred16_t p) */
struct store_def : public overloaded_base<0>
{
void
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.h b/gcc/config/arm/arm-mve-builtins-shapes.h
index e53381d..db7c631 100644
--- a/gcc/config/arm/arm-mve-builtins-shapes.h
+++ b/gcc/config/arm/arm-mve-builtins-shapes.h
@@ -62,6 +62,7 @@ namespace arm_mve
extern const function_shape *const create;
extern const function_shape *const inherent;
extern const function_shape *const load;
+ extern const function_shape *const load_ext;
extern const function_shape *const mvn;
extern const function_shape *const store;
extern const function_shape *const ternary;