> -----Original Message----- > From: Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> > Sent: 07 December 2020 11:26 > To: Kyrylo Tkachov <kyrylo.tkac...@arm.com> > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PR66791][ARM] Replace calls to __builtin_neon_vmvn* by ~ for > vmvn intrinsics > > On Mon, 7 Dec 2020 at 16:34, Kyrylo Tkachov <kyrylo.tkac...@arm.com> > wrote: > > > > Hi Prathamesh, > > > > > -----Original Message----- > > > From: Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> > > > Sent: 07 December 2020 11:01 > > > To: Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > > Cc: gcc-patches@gcc.gnu.org > > > Subject: Re: [PR66791][ARM] Replace calls to __builtin_neon_vmvn* by ~ > for > > > vmvn intrinsics > > > > > > On Thu, 3 Dec 2020 at 16:05, Kyrylo Tkachov <kyrylo.tkac...@arm.com> > > > wrote: > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Gcc-patches <gcc-patches-boun...@gcc.gnu.org> On Behalf > Of > > > > > Prathamesh Kulkarni via Gcc-patches > > > > > Sent: 03 December 2020 10:30 > > > > > To: gcc Patches <gcc-patches@gcc.gnu.org>; Kyrill Tkachov > > > > > <kyrylo.tkac...@foss.arm.com> > > > > > Subject: Re: [PR66791][ARM] Replace calls to __builtin_neon_vmvn* > by ~ > > > for > > > > > vmvn intrinsics > > > > > > > > > > On Wed, 25 Nov 2020 at 22:01, Prathamesh Kulkarni > > > > > <prathamesh.kulka...@linaro.org> wrote: > > > > > > > > > > > > Hi, > > > > > > This patch replaces calls to __builtin_neon_vmvnv* builtins with ~ > > > > > > operator in arm_neon.h. > > > > > > Cross-tested on arm*-*-*. > > > > > > OK to commit ? > > > > > > > > Ok. > > > Hi Kyrill, > > > I have attached an updated patch that removes entry for vmvn from > > > arm_neon_builtins.def, > > > but I am not sure if that's sufficient ? > > > > > > I tried this: > > > __extension__ extern __inline uint32x2_t > > > __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) > > > vmvn_u32 (uint32x2_t __a) > > > { > > > return (uint32x4_t)__builtin_neon_vmvnv4si ((int32x4_t) __a); > > > // return ~__a; > > > } > > > > > > after removing the entry for vmvn, from arm_neon_builtins.def, but > > > compilation appeared to proceed successfully, > > > so I guess it hasn't stopped the builtin from being created ? > > > > > > > I think you'll want to look at the generated assembly? > > IIRC if the builtin isn't created then the assembly will contain a call to > __builtin_neon_vmvnv4si, which of course will fail at link-time. > Ah, indeed. When I try to call it, it now results in: > vmvn.c:6:22: warning: implicit declaration of function > ‘__builtin_neon_vmvnv2si’; did you mean ‘__builtin_neon_vmlav2si’? > [-Wimplicit-function-declaration] > 6 | return (uint32x2_t)__builtin_neon_vmvnv2si ((int32x2_t) __a); > | ^~~~~~~~~~~~~~~~~~~~~~~ > | __builtin_neon_vmlav2si > vmvn.c:6:3: error: cannot convert a value of type ‘int’ to vector type > ‘__simd64_uint32_t’ which has different size > 6 | return (uint32x2_t)__builtin_neon_vmvnv2si ((int32x2_t) __a); > | ^~~~~~ > > so I suppose it has correctly removed it. > Is it OK to commit the patch ?
Ok. Thanks, Kyrill > > Thanks, > Prathamesh > > > > Thanks, > > Kyrill > > > > > Thanks, > > > Prathamesh > > > > Sorry for missing this. > > > > Thanks, > > > > Kyrill > > > > > > > > P.S. please use my @arm.com address when CC'ing me, I don't have > access > > > to the foss.arm.com one currently... > > > > > > > > > ping https://gcc.gnu.org/pipermail/gcc-patches/2020- > > > > > November/560223.html > > > > > > > > > > Thanks, > > > > > Prathamesh > > > > > > > > > > > > Thanks, > > > > > > Prathamesh