]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: [MVE intrinsics] add scalar_s64_shift scalar_u64_shift shapes [PR122216]
authorChristophe Lyon <christophe.lyon@linaro.org>
Fri, 19 Sep 2025 12:35:35 +0000 (12:35 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Fri, 14 Nov 2025 07:37:01 +0000 (07:37 +0000)
This patch adds the scalar_s64_shift and scalar_u64_shift shape
descriptions.

gcc/ChangeLog:

PR target/122216
* config/arm/arm-mve-builtins-shapes.cc (scalar_s64_shift): New.
(scalar_u64_shift): New.
* config/arm/arm-mve-builtins-shapes.h: Likewise.

gcc/config/arm/arm-mve-builtins-shapes.cc
gcc/config/arm/arm-mve-builtins-shapes.h

index aeb14530a0829b025d506c9d50d310c0709b09e9..f85b82af358afe6705e63340d2b403ff2dce2b1a 100644 (file)
@@ -1682,6 +1682,36 @@ struct mvn_def : public overloaded_base<0>
 };
 SHAPE (mvn)
 
+/* int64_t foo(int64_t, int32_t)
+
+   Example: asrl
+   int64_t [__arm_]arsl(int64_t value, int32_t shift)  */
+struct scalar_s64_shift_def : public nonoverloaded_base
+{
+  void
+  build (function_builder &b, const function_group_info &group,
+        bool preserve_user_namespace) const override
+  {
+    build_all (b, "ss64,ss64,ss32", group, MODE_none, preserve_user_namespace);
+  }
+};
+SHAPE (scalar_s64_shift)
+
+/* uint64_t foo(uint64_t, int32_t)
+
+   Example: lsll.
+   uint64_t [__arm_]lsll(uint64_t value, int32_t shift)  */
+struct scalar_u64_shift_def : public nonoverloaded_base
+{
+  void
+  build (function_builder &b, const function_group_info &group,
+        bool preserve_user_namespace) const override
+  {
+    build_all (b, "su64,su64,ss32", group, MODE_none, preserve_user_namespace);
+  }
+};
+SHAPE (scalar_u64_shift)
+
 /* void vfoo[_t0](<X>_t *, <T0>[xN]_t)
 
    where <X> might be tied to <t0> (for non-truncating stores) or might
index 6b839c577c6bf26c22148aab85ed614404ace1bd..f1838e6da423812fa273eea0fc02710908b43b97 100644 (file)
@@ -66,6 +66,8 @@ namespace arm_mve
     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 scalar_s64_shift;
+    extern const function_shape *const scalar_u64_shift;
     extern const function_shape *const store;
     extern const function_shape *const store_scatter_base;
     extern const function_shape *const store_scatter_offset;