[ARM][PATCH]: Add MVE ACLE intrinsics vbicq_n_* polymorphic variant support.
authorSrinath Parvathaneni <srinath.parvathaneni@arm.com>
Tue, 31 Mar 2020 10:06:23 +0000 (11:06 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 31 Mar 2020 10:08:22 +0000 (11:08 +0100)
For the following MVE ACLE intrinsics, polymorphic variant support is missing on the trunk.

vbicq_n_s16, vbicq_n_s32, vbicq_n_u16 and vbicq_n_u32.

This patch add the polymorphic variant support for above intrinsics.

Please refer to M-profile Vector Extension (MVE) intrinsics [1]  for more details.
[1] https://developer.arm.com/architectures/instruction-sets/simd-isas/helium/mve-intrinsics

2020-03-31  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

* config/arm/arm_mve.h (vbicq): Define MVE intrinsic polymorphic
variant.
(__arm_vbicq): Likewise.

2020-03-31  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

* gcc.target/arm/mve/intrinsics/vbicq_n_s16.c: Modify.
* gcc.target/arm/mve/intrinsics/vbicq_n_s32.c: Likewise.
* gcc.target/arm/mve/intrinsics/vbicq_n_u16.c: Likewise.
* gcc.target/arm/mve/intrinsics/vbicq_n_u32.c: Likewise.

gcc/ChangeLog
gcc/config/arm/arm_mve.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/mve/intrinsics/vbicq_n_s16.c
gcc/testsuite/gcc.target/arm/mve/intrinsics/vbicq_n_s32.c
gcc/testsuite/gcc.target/arm/mve/intrinsics/vbicq_n_u16.c
gcc/testsuite/gcc.target/arm/mve/intrinsics/vbicq_n_u32.c

index 136711868a5be116a9c701fb284b3343ca73d9f0..928c79399258fec0361e2d0a15dc46fb92915c42 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-31  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
+
+       * config/arm/arm_mve.h (vbicq): Define MVE intrinsic polymorphic
+       variant.
+       (__arm_vbicq): Likewise.
+
 2020-0-31  Vineet Gupta <vgupta@synopsys.com>
 
        * config/arc/linux.h: GLIBC_DYNAMIC_LINKER support BE/arc700.
index 03ce0dd7e67bdacb74dcf1855c61075e078efe1b..f1dcdc2153217e796c58526ba0e5be11be642234 100644 (file)
@@ -20704,6 +20704,10 @@ extern void *__ARM_undef;
 #define __arm_vbicq(p0,p1) ({ __typeof(p0) __p0 = (p0); \
   __typeof(p1) __p1 = (p1); \
   _Generic( (int (*)[__ARM_mve_typeid(__p0)][__ARM_mve_typeid(__p1)])0, \
+  int (*)[__ARM_mve_type_int16x8_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_s16 (__ARM_mve_coerce(__p0, int16x8_t), __ARM_mve_coerce1(__p1, int)), \
+  int (*)[__ARM_mve_type_int32x4_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_s32 (__ARM_mve_coerce(__p0, int32x4_t), __ARM_mve_coerce1(__p1, int)), \
+  int (*)[__ARM_mve_type_uint16x8_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_u16 (__ARM_mve_coerce(__p0, uint16x8_t), __ARM_mve_coerce1(__p1, int)), \
+  int (*)[__ARM_mve_type_uint32x4_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_u32 (__ARM_mve_coerce(__p0, uint32x4_t), __ARM_mve_coerce1(__p1, int)), \
   int (*)[__ARM_mve_type_int8x16_t][__ARM_mve_type_int8x16_t]: __arm_vbicq_s8 (__ARM_mve_coerce(__p0, int8x16_t), __ARM_mve_coerce(__p1, int8x16_t)), \
   int (*)[__ARM_mve_type_int16x8_t][__ARM_mve_type_int16x8_t]: __arm_vbicq_s16 (__ARM_mve_coerce(__p0, int16x8_t), __ARM_mve_coerce(__p1, int16x8_t)), \
   int (*)[__ARM_mve_type_int32x4_t][__ARM_mve_type_int32x4_t]: __arm_vbicq_s32 (__ARM_mve_coerce(__p0, int32x4_t), __ARM_mve_coerce(__p1, int32x4_t)), \
@@ -24073,6 +24077,10 @@ extern void *__ARM_undef;
 #define __arm_vbicq(p0,p1) ({ __typeof(p0) __p0 = (p0); \
   __typeof(p1) __p1 = (p1); \
   _Generic( (int (*)[__ARM_mve_typeid(__p0)][__ARM_mve_typeid(__p1)])0, \
+  int (*)[__ARM_mve_type_int16x8_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_s16 (__ARM_mve_coerce(__p0, int16x8_t), __ARM_mve_coerce1(__p1, int)), \
+  int (*)[__ARM_mve_type_int32x4_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_s32 (__ARM_mve_coerce(__p0, int32x4_t), __ARM_mve_coerce1(__p1, int)), \
+  int (*)[__ARM_mve_type_uint16x8_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_u16 (__ARM_mve_coerce(__p0, uint16x8_t), __ARM_mve_coerce1(__p1, int)), \
+  int (*)[__ARM_mve_type_uint32x4_t][__ARM_mve_type_int32_t]: __arm_vbicq_n_u32 (__ARM_mve_coerce(__p0, uint32x4_t), __ARM_mve_coerce1(__p1, int)), \
   int (*)[__ARM_mve_type_int8x16_t][__ARM_mve_type_int8x16_t]: __arm_vbicq_s8 (__ARM_mve_coerce(__p0, int8x16_t), __ARM_mve_coerce(__p1, int8x16_t)), \
   int (*)[__ARM_mve_type_int16x8_t][__ARM_mve_type_int16x8_t]: __arm_vbicq_s16 (__ARM_mve_coerce(__p0, int16x8_t), __ARM_mve_coerce(__p1, int16x8_t)), \
   int (*)[__ARM_mve_type_int32x4_t][__ARM_mve_type_int32x4_t]: __arm_vbicq_s32 (__ARM_mve_coerce(__p0, int32x4_t), __ARM_mve_coerce(__p1, int32x4_t)), \
index b6b87d2b3f1027ff5e219c5e0ccefbe5363bde75..197d87a67af4c96e54ee594f4e807a022be1e52c 100644 (file)
@@ -1,3 +1,10 @@
+2020-03-31  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
+
+       * gcc.target/arm/mve/intrinsics/vbicq_n_s16.c: Modify.
+       * gcc.target/arm/mve/intrinsics/vbicq_n_s32.c: Likewise.
+       * gcc.target/arm/mve/intrinsics/vbicq_n_u16.c: Likewise.
+       * gcc.target/arm/mve/intrinsics/vbicq_n_u32.c: Likewise.
+
 2020-03-31  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
 
        * gcc.target/arm/mve/intrinsics/vcmpcsq_m_n_u16.c: Modify.
index 96b9699d6b166954f0d5900abc47c64e18416d0c..ecc48503fc2d2b16c9135c412df22f748874750c 100644 (file)
@@ -10,4 +10,10 @@ foo (int16x8_t a)
   return vbicq_n_s16 (a, 1);
 }
 
-/* { dg-final { scan-assembler "vbic.i16"  }  } */
+int16x8_t
+foo1 (int16x8_t a)
+{
+  return vbicq (a, 1);
+}
+
+/* { dg-final { scan-assembler-times "vbic.i16" 2 }  } */
index b262c835134b932968013b9abedb54c7ab901ae0..013cdf15cfd974ab82379d95e68b5a1bdf8936ca 100644 (file)
@@ -10,4 +10,10 @@ foo (int32x4_t a)
   return vbicq_n_s32 (a, 1);
 }
 
-/* { dg-final { scan-assembler "vbic.i32"  }  } */
+int32x4_t
+foo1 (int32x4_t a)
+{
+  return vbicq (a, 1);
+}
+
+/* { dg-final { scan-assembler-times "vbic.i32" 2 }  } */
index 3691bc64e50d37f31bd5dff21e23091a58bf98de..b24db154ad874dc016590adb5e99be4e97044a42 100644 (file)
@@ -10,4 +10,10 @@ foo (uint16x8_t a)
   return vbicq_n_u16 (a, 1);
 }
 
-/* { dg-final { scan-assembler "vbic.i16"  }  } */
+uint16x8_t
+foo1 (uint16x8_t a)
+{
+  return vbicq (a, 1);
+}
+
+/* { dg-final { scan-assembler-times "vbic.i16" 2 }  } */
index fc976b9aa2ed7827ee3bd380bb58858cbb12c2f1..1261fbb523cfb596c272f114dceb8e8024dbc297 100644 (file)
@@ -10,4 +10,10 @@ foo (uint32x4_t a)
   return vbicq_n_u32 (a, 1);
 }
 
-/* { dg-final { scan-assembler "vbic.i32"  }  } */
+uint32x4_t
+foo1 (uint32x4_t a)
+{
+  return vbicq (a, 1);
+}
+
+/* { dg-final { scan-assembler-times "vbic.i32" 2 }  } */