From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126610 invoked by alias); 23 Nov 2015 14:25:21 -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 126596 invoked by uid 89); 23 Nov 2015 14:25:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: cam-smtp0.cambridge.arm.com Received: from fw-tnat.cambridge.arm.com (HELO cam-smtp0.cambridge.arm.com) (217.140.96.140) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 23 Nov 2015 14:25:19 +0000 Received: from arm.com (e107456-lin.cambridge.arm.com [10.2.206.78]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id tANEPEM7004178; Mon, 23 Nov 2015 14:25:14 GMT Date: Mon, 23 Nov 2015 14:35:00 -0000 From: James Greenhalgh To: Bilyan Borisov Cc: gcc-patches@gcc.gnu.org Subject: Re: [AARCH64] Adding constant folding for __builtin_fmulx* with scalar 32 and 64 bit arguments Message-ID: <20151123142514.GD11516@arm.com> References: <5640861B.9090801@foss.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5640861B.9090801@foss.arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02728.txt.bz2 On Mon, Nov 09, 2015 at 11:40:11AM +0000, Bilyan Borisov wrote: > This patch adds an extension to aarch64_gimple_fold_builtin () that does > constant folding on __builtin_fmulx* calls for 32 and 64 bit floating point > scalar modes. We fold when both arguments are constant, as well as when only one > is. The special cases of 0*inf, -0*inf, 0*-inf, and -0*-inf are also > handled. The case for vector constant arguments will be dealt with in a future > patch since the tests for that would be obscure and would unnecessarily > complicate this patch. > > Added tests to check for proper handling of constant folding. Tested on targets > aarch64-none-elf and aarch64_be-none-elf. > > --- > > gcc/ > > 2015-XX-XX Bilyan Borisov > > * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin): Added > constant folding. > > gcc/testsuite/ > > 2015-XX-XX Bilyan Borisov > > * gcc.target/aarch64/simd/vmulx.x: New. > * gcc.target/aarch64/simd/vmulx_f64_2.c: Likewise. > * gcc.target/aarch64/simd/vmulxd_f64_2.c: Likewise. > * gcc.target/aarch64/simd/vmulxs_f32_2.c: Likewise. > OK, thanks. I've committed this on your behalf as revision 230758 with a slight tweak to the changelog to read: * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin): Fold FMULX. Thanks, James