From 9eeeef2877adab2b0af2486bedb731c0fc89bdf2 Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Wed, 16 Dec 2020 11:54:37 +0530 Subject: [PATCH] arm: Replace calls to __builtin_vneg* by - in arm_neon.h [PR66791] gcc/ 2020-12-16 Prathamesh Kulkarni PR target/66791 * config/arm/arm_neon.h: Replace calls to __builtin_vneg* by - operator in vneg intrinsics. * config/arm/arm_neon_builtins.def: Remove entry for vneg. --- gcc/config/arm/arm_neon.h | 16 ++++++++-------- gcc/config/arm/arm_neon_builtins.def | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index ed2e914ae68..1535e658620 100644 --- a/gcc/config/arm/arm_neon.h +++ b/gcc/config/arm/arm_neon.h @@ -5714,56 +5714,56 @@ __extension__ extern __inline int8x8_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vneg_s8 (int8x8_t __a) { - return (int8x8_t)__builtin_neon_vnegv8qi (__a); + return -__a; } __extension__ extern __inline int16x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vneg_s16 (int16x4_t __a) { - return (int16x4_t)__builtin_neon_vnegv4hi (__a); + return -__a; } __extension__ extern __inline int32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vneg_s32 (int32x2_t __a) { - return (int32x2_t)__builtin_neon_vnegv2si (__a); + return -__a; } __extension__ extern __inline float32x2_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vneg_f32 (float32x2_t __a) { - return (float32x2_t)__builtin_neon_vnegv2sf (__a); + return -__a; } __extension__ extern __inline int8x16_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vnegq_s8 (int8x16_t __a) { - return (int8x16_t)__builtin_neon_vnegv16qi (__a); + return -__a; } __extension__ extern __inline int16x8_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vnegq_s16 (int16x8_t __a) { - return (int16x8_t)__builtin_neon_vnegv8hi (__a); + return -__a; } __extension__ extern __inline int32x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vnegq_s32 (int32x4_t __a) { - return (int32x4_t)__builtin_neon_vnegv4si (__a); + return -__a; } __extension__ extern __inline float32x4_t __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) vnegq_f32 (float32x4_t __a) { - return (float32x4_t)__builtin_neon_vnegv4sf (__a); + return -__a; } __extension__ extern __inline int8x8_t diff --git a/gcc/config/arm/arm_neon_builtins.def b/gcc/config/arm/arm_neon_builtins.def index cf90427e7f4..1ae0b1d3475 100644 --- a/gcc/config/arm/arm_neon_builtins.def +++ b/gcc/config/arm/arm_neon_builtins.def @@ -195,7 +195,6 @@ VAR8 (UNOP, vabs, v8qi, v4hi, v2si, v2sf, v16qi, v8hi, v4si, v4sf) VAR2 (UNOP, vabs, v8hf, v4hf) VAR2 (UNOP, vneg, v8hf, v4hf) VAR6 (UNOP, vqabs, v8qi, v4hi, v2si, v16qi, v8hi, v4si) -VAR8 (UNOP, vneg, v8qi, v4hi, v2si, v2sf, v16qi, v8hi, v4si, v4sf) VAR6 (UNOP, vqneg, v8qi, v4hi, v2si, v16qi, v8hi, v4si) VAR6 (UNOP, vcls, v8qi, v4hi, v2si, v16qi, v8hi, v4si) VAR6 (UNOP, vclz, v8qi, v4hi, v2si, v16qi, v8hi, v4si) -- 2.30.2