[PR66791][ARM] Replace calls to __builtin_neon_vmvn* by ~ for vmvn intrinsics

Kyrylo Tkachov Kyrylo.Tkachov@arm.com
Mon Dec 7 11:04:06 GMT 2020


Hi Prathamesh,

> -----Original Message-----
> From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> Sent: 07 December 2020 11:01
> To: Kyrylo Tkachov <Kyrylo.Tkachov@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.Tkachov@arm.com>
> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Gcc-patches <gcc-patches-bounces@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.tkachov@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.kulkarni@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.

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


More information about the Gcc-patches mailing list