]> gcc.gnu.org Git - gcc.git/commitdiff
arm: [MVE intrinsics] add binary_opt_n shape
authorChristophe Lyon <christophe.lyon@arm.com>
Fri, 3 Feb 2023 12:56:47 +0000 (12:56 +0000)
committerChristophe Lyon <christophe.lyon@arm.com>
Wed, 3 May 2023 14:58:27 +0000 (16:58 +0200)
This patch adds the binary_opt_n shape description.

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

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

index ce476aa196e6e338746ec6f7340ade810ab6e86d..033b304060a3603d83f16cd93b4401a1abfa8de5 100644 (file)
@@ -338,6 +338,38 @@ struct overloaded_base : public function_shape
   }
 };
 
+/* <T0>_t vfoo[_t0](<T0>_t, <T0>_t)
+   <T0>_t vfoo[_n_t0](<T0>_t, <S0>_t)
+
+   i.e. the standard shape for binary operations that operate on
+   uniform types.
+
+   Example: vaddq.
+   int8x16_t [__arm_]vaddq[_s8](int8x16_t a, int8x16_t b)
+   int8x16_t [__arm_]vaddq[_n_s8](int8x16_t a, int8_t b)
+   int8x16_t [__arm_]vaddq_m[_s8](int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)
+   int8x16_t [__arm_]vaddq_m[_n_s8](int8x16_t inactive, int8x16_t a, int8_t b, mve_pred16_t p)
+   int8x16_t [__arm_]vaddq_x[_s8](int8x16_t a, int8x16_t b, mve_pred16_t p)
+   int8x16_t [__arm_]vaddq_x[_n_s8](int8x16_t a, int8_t b, mve_pred16_t p)  */
+struct binary_opt_n_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, "v0,v0,v0", group, MODE_none, preserve_user_namespace);
+    build_all (b, "v0,v0,s0", group, MODE_n, preserve_user_namespace);
+  }
+
+  tree
+  resolve (function_resolver &r) const override
+  {
+    return r.resolve_uniform_opt_n (2);
+  }
+};
+SHAPE (binary_opt_n)
+
 /* <T0>[xN]_t vfoo_t0().
 
    Example: vuninitializedq.
index a491369425c323b811deb0c2857a905abf346523..43798fdde57c1206073d5ec8b50701b4d54da6fa 100644 (file)
@@ -34,6 +34,7 @@ namespace arm_mve
   namespace shapes
   {
 
+    extern const function_shape *const binary_opt_n;
     extern const function_shape *const inherent;
     extern const function_shape *const unary_convert;
 
This page took 0.070674 seconds and 5 git commands to generate.