]> gcc.gnu.org Git - gcc.git/commitdiff
arm: [MVE intrinsics] add binary_acc_int32 shape
authorChristophe Lyon <christophe.lyon@arm.com>
Tue, 21 Feb 2023 22:30:25 +0000 (22:30 +0000)
committerChristophe Lyon <christophe.lyon@arm.com>
Thu, 11 May 2023 19:04:09 +0000 (21:04 +0200)
This patch adds the binary_acc_int32 shape description.

2022-10-25  Christophe Lyon  <christophe.lyon@arm.com>

gcc/
* config/arm/arm-mve-builtins-shapes.cc (binary_acc_int32): New.
* config/arm/arm-mve-builtins-shapes.h (binary_acc_int32): New.

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

index a7faf8299cbc495b565ebee060b11a0d024f614f..e491c810b405d1432659f43e6d6798e957dfd442 100644 (file)
@@ -365,6 +365,33 @@ struct binary_def : public overloaded_base<0>
 };
 SHAPE (binary)
 
+/* <[u]int32>_t vfoo[_<t0>](<T0>_t, <T0>_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)
+
 /* <T0>_t vfoo[_n_t0](<T0>_t, const int)
 
    Shape for vector shift right operations that take a vector first
index 46cc26ef918a4c0499528fee611ff9a6fdf845f0..9e877c9591aafc0098a1e1afabaca334512cf739 100644 (file)
@@ -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;
This page took 0.074374 seconds and 5 git commands to generate.