From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25993 invoked by alias); 15 Sep 2016 11:01:00 -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 25966 invoked by uid 89); 15 Sep 2016 11:00:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_00,LIKELY_SPAM_BODY,SPF_PASS autolearn=no version=3.3.2 spammy=advertising, re-testing, retesting, infinities X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Sep 2016 11:00:49 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03lp0082.outbound.protection.outlook.com [94.245.120.82]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-34-4IMM3-6mP5ikOmPJuRxIgg-1; Thu, 15 Sep 2016 12:00:45 +0100 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by AM5PR0801MB2017.eurprd08.prod.outlook.com (10.168.158.20) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.619.10; Thu, 15 Sep 2016 11:00:44 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com ([10.175.46.18]) by AM5PR0802MB2610.eurprd08.prod.outlook.com ([10.175.46.18]) with mapi id 15.01.0619.012; Thu, 15 Sep 2016 11:00:44 +0000 From: Wilco Dijkstra To: Tamar Christina , Joseph Myers CC: GCC Patches , "jakub@redhat.com" , "rguenther@suse.de" , "law@redhat.com" , nd Subject: Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible Date: Thu, 15 Sep 2016 11:21:00 -0000 Message-ID: References: <9a9cc4d4-f4ff-6507-9a09-a0d99525720e@arm.com> ,<470b48c8-5ed9-cc23-f6f5-a87fc9e0bc52@arm.com> In-Reply-To: <470b48c8-5ed9-cc23-f6f5-a87fc9e0bc52@arm.com> x-ms-office365-filtering-correlation-id: ca87da71-486e-4bef-ccb2-08d3dd578a62 x-microsoft-exchange-diagnostics: 1;AM5PR0801MB2017;20:oL/YGcKjprjwJOPZMpGo0uP6Crwx8w/hSlt3e0i0HKFdpcz0sX19ThRqJA5XNStlkZdX4ae0bvWPmgyhX0Yb+xDAZBPz56rIxwxTvuy65VKggOC8VS6Lbuk3eMs1DEgmyCJqEDlrFJM6L+wkDgRON9jwmLLrSZk1fv/T9fuHL6Y= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB2017; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026);SRVR:AM5PR0801MB2017;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB2017; x-forefront-prvs: 0066D63CE6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(199003)(24454002)(7696004)(2906002)(8676002)(8936002)(10400500002)(54356999)(5660300001)(76576001)(76176999)(74316002)(105586002)(50986999)(81166006)(7736002)(68736007)(305945005)(9686002)(101416001)(7846002)(87936001)(66066001)(11100500001)(3280700002)(189998001)(92566002)(3660700001)(5001770100001)(97736004)(106356001)(81156014)(5002640100001)(33656002)(106116001)(77096005)(93886004)(586003)(86362001)(4326007)(2900100001)(122556002)(102836003)(3846002)(6116002)(2950100001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0801MB2017;H:AM5PR0802MB2610.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2016 11:00:44.0683 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2017 X-MC-Unique: 4IMM3-6mP5ikOmPJuRxIgg-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-09/txt/msg00931.txt.bz2 Tamar Christina wrote: > On 13/09/16 13:43, Joseph Myers wrote: > > On Tue, 13 Sep 2016, Tamar Christina wrote: >> > >> On 12/09/16 23:33, Joseph Myers wrote: > >>> Why is this boolean false for ieee_quad_format, mips_quad_format and > >>> ieee_half_format?=A0 They should meet your description (even if the x= 86 / > >>> m68k "extended" formats don't because of the leading mantissa bit bei= ng > >>> set for infinities). > >>> > >> Ah, I played it a bit too safe there. I will change this and do some > >> re-testing and update the patch. > > It occurred to me that there might be an issue with your approach of > > overlaying the floating-point value with a single integer, when the quad > > formats are used on 32-bit systems where TImode isn't fully supported a= s a > > scalar mode.=A0 However, if that's an issue the answer isn't to mark the > > formats as non-IEEE, it's to support ORing together the relevant parts = of > > multiple words when determining whether the mantissa is nonzero (or some > > equivalent logic). > > > I have been trying to reproduce this on the architectures I have access to > but have been unable to so far. In practice if this does happen though=20 > isn't it the fault of the system for advertising partial TImode support a= nd=20 > support of IEEE types? > > It seems to me that in order for me to be able to do this fpclassify=20 > would incur a rather large costs in complexity. Also wouldn't this be pro= blematic=20 > for other functions as well such as expand_builtin_signbit? Yes, if there are targets which don't implement TImode operations then sure= ly they should be automatically split into DImode operations before or during = Expand? GCC's implementation of types larger than the register int type is generall= y extremely poor as it is missing such an expansion (practically all compilers do this)= , so this would improve things significantly. So for now it would seem best to keep the boolean false for quad formats on= 32-bit targets. Wilco