From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44111 invoked by alias); 23 Jul 2018 16:21:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 44101 invoked by uid 89); 23 Jul 2018 16:21:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=maintainers, Hx-languages-length:2941 X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0074.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Jul 2018 16:21:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WWc8kz5V/pBPnt+AIu5VP4ZBD0fp8UdZaWHgH3+AhBY=; b=R8hlxbzxgrJt4lE1ZRl+w/WSucZdmCOoMKFvVRt2WLOUl7jhvM6CMh1hPBziJUMDFOhWf7oVozra/0h8DAdvFA9lcUb+qoaMKT8ozTfwB0KS/+tkGi3CqLc3fafl3WigaCpTntoTkNE4HFxQ0e0G4uvWF8hEGRoIW2Pqyxm4Zlc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Sudi.Das@arm.com; Received: from [10.37.12.138] (217.140.96.140) by DB6PR0801MB1718.eurprd08.prod.outlook.com (2603:10a6:4:3a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Mon, 23 Jul 2018 16:21:16 +0000 Subject: Re: [PATCH][AArch64] Implement new intrinsics vabsd_s64 and vnegd_s64 To: Vlad Lazar , "gcc-patches@gcc.gnu.org" Cc: nd@arm.com, Richard Earnshaw , James Greenhalgh References: From: Sudakshina Das Message-ID: Date: Mon, 23 Jul 2018 16:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-Path: sudi.das@arm.com Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg01267.txt.bz2 Hi Vlad On Friday 20 July 2018 10:37 AM, Vlad Lazar wrote: > Hi, > > The patch adds implementations for the NEON intrinsics vabsd_s64 and > vnegd_s64. > (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/docs/ihi0073/latest/arm-neon-intrinsics-reference-architecture-specification) > > > Bootstrapped and regtested on aarch64-none-linux-gnu and there are no > regressions. > > OK for trunk? Thanks for doing this. This looks good to me but you will a maintainer's approval. Thanks Sudi > > Thanks, > Vlad > > gcc/ > 2018-07-02  Vlad Lazar  > >     * config/aarch64/arm_neon.h (vabsd_s64, vnegd_s64): New. > > gcc/testsuite/ > 2018-07-02  Vlad Lazar  > >     * gcc.target/aarch64/scalar_intrinsics.c (test_vabsd_s64, > test_vabsd_s64): New. > > --- > > diff --git a/gcc/config/aarch64/arm_neon.h > b/gcc/config/aarch64/arm_neon.h > index > 2d18400040f031dfcdaf60269ad484647804e1be..19e22431a85bcd09d0ea759b42b0a52420b6c43c > 100644 > --- a/gcc/config/aarch64/arm_neon.h > +++ b/gcc/config/aarch64/arm_neon.h > @@ -11822,6 +11822,13 @@ vabsq_s64 (int64x2_t __a) >    return __builtin_aarch64_absv2di (__a); >  } > > +__extension__ extern __inline int64_t > +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) > +vabsd_s64 (int64_t __a) > +{ > +  return __builtin_aarch64_absdi (__a); > +} > + >  /* vadd */ > >  __extension__ extern __inline int64_t > @@ -22907,6 +22914,12 @@ vneg_s64 (int64x1_t __a) >    return -__a; >  } > > +__extension__ extern __inline int64_t > +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) > +vnegd_s64 (int64_t __a) > +{ > +  return -__a; > +} >  __extension__ extern __inline float32x4_t >  __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) >  vnegq_f32 (float32x4_t __a) > diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c > b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c > index > ea29066e369b967d0781d31c8a5208bda9e4f685..45afeec373971838e0cd107038b4aa51a2d4998f > 100644 > --- a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c > +++ b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c > @@ -603,6 +603,14 @@ test_vsqaddd_u64 (uint64_t a, int64_t b) >    return vsqaddd_u64 (a, b); >  } > > +/* { dg-final { scan-assembler-times "\\tabs\\td\[0-9\]+" 1 } } */ > + > +int64_t > +test_vabsd_s64 (int64_t a) > +{ > +  return vabsd_s64 (a); > +} > + >  /* { dg-final { scan-assembler-times "\\tsqabs\\tb\[0-9\]+" 1 } } */ > >  int8_t > @@ -627,6 +635,14 @@ test_vqabss_s32 (int32_t a) >    return vqabss_s32 (a); >  } > > +/* { dg-final { scan-assembler-times "\\tneg\\tx\[0-9\]+" 1 } } */ > + > +int64_t > +test_vnegd_s64 (int64_t a) > +{ > +  return vnegd_s64 (a); > +} > + >  /* { dg-final { scan-assembler-times "\\tsqneg\\tb\[0-9\]+" 1 } } */ > >  int8_t