From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67496 invoked by alias); 27 May 2016 16:52:31 -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 67427 invoked by uid 89); 27 May 2016 16:52:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=sitting, utilizing, Hx-languages-length:1995 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 May 2016 16:52:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5820F34; Fri, 27 May 2016 09:52:44 -0700 (PDT) Received: from [10.2.206.198] (e104437-lin.cambridge.arm.com [10.2.206.198]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6BD5F3F246; Fri, 27 May 2016 09:52:18 -0700 (PDT) Subject: Re: [AArch64, 1/6] Reimplement scalar fixed-point intrinsics To: James Greenhalgh References: <57430251.6060902@foss.arm.com> <57440F88.2060603@foss.arm.com> <20160527130344.GF26495@arm.com> Cc: GCC Patches From: Jiong Wang Message-ID: <57487B41.8020200@foss.arm.com> Date: Fri, 27 May 2016 20:01:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160527130344.GF26495@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg02222.txt.bz2 On 27/05/16 14:03, James Greenhalgh wrote: > On Tue, May 24, 2016 at 09:23:36AM +0100, Jiong Wang wrote: >> * config/aarch64/aarch64-simd-builtins.def: Rename to >> aarch64-builtins.def. > Why? We already have some number of intrinsics in here that are not > strictly SIMD, but I don't see the value in the rename? Mostly because this builtin infrastructure is handy that I want to implement some vfp builtins in this .def file instead of implement those raw structure inside aarch64-builtins.c. And there maybe more and more such builtins in the future, so I renamed this file. Is this OK? >> +(define_int_iterator FCVT_FIXED2F_SCALAR [UNSPEC_SCVTF_SCALAR UNSPEC_UCVTF_SCALAR]) > Again, do we need the "SCALAR" versions at all? That's because for scalar fixed-point conversion, we have two types of instructions to support this. * scalar instruction from vfp * scalar variant instruction from simd One is guarded by TARGET_FLOAT, the other is guarded by TARGET_SIMD, and their instruction format is different, so I want to keep them in aarch64.md and aarch64-simd.md seperately. The other reason is these two use different patterns: * vfp scalar support conversion between different size, for example, SF->DI, DF->SI, so it's using two mode iterators, GPI and GPF, and is utilizing the product of the two to cover all supported conversions, sfsi, sfdi, dfsi, dfdi, sisf, sidf, disf, didf. * simd scalar only support conversion between same size that single mode iterator is used to cover sfsi, sisf, dfdi, didf. For intrinsics implementation, I used builtins backed by vfp scalar instead of simd scalar which requires the input sitting inside vector register. I remember the simd scalar pattern was here because it's anyway needed by patch [2/6] which extends it's modes naturally to vector modes. I was thinking it's better to keep simd scalar variant with this scalar intrinsics enable patch. Is this OK? Thanks.