From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89771 invoked by alias); 8 Aug 2019 20:05:22 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 89763 invoked by uid 89); 8 Aug 2019 20:05:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=rs6000md, UD:rs6000.md, rs6000.md, H*f:sk:CACMrGj X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Aug 2019 20:05:20 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x78K5GEd021604; Thu, 8 Aug 2019 15:05:16 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x78K5EVv021603; Thu, 8 Aug 2019 15:05:14 -0500 Date: Thu, 08 Aug 2019 20:05:00 -0000 From: Segher Boessenkool To: Tejas Joshi Cc: gcc@gcc.gnu.org, Martin Jambor , hubicka@ucw.cz, joseph@codesourcery.com Subject: Re: Expansion of narrowing math built-ins into power instructions Message-ID: <20190808200514.GL31406@gate.crashing.org> References: <87sgqnx4i6.fsf@oldenburg2.str.redhat.com> <20190731144722.GS31406@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00059.txt.bz2 Hi! On Fri, Aug 09, 2019 at 12:14:54AM +0530, Tejas Joshi wrote: > > In GCC (in rs6000.md) we have the "*add3_fpr" and similar insns, > > which could be extended to allow DF inputs with an SF output; it doesn't > > yet allow it. > > This might be very lousy but I am confused with the optabs and insn > name rn, the comments in obtabs.def says that these patterns are > present in md as insn names. How can fadd function be mapped with the > "fadd3_fpr" pattern name? The actual name starts with an asterisk, which means as it is it can never be used by name. But, right above this pattern, there is the define_expand named add3 (for modes SFDF). These current patterns all take the same mode for all inputs and outputs (that's what 3 indicates, say, fadddf3). You will need to define something that takes two SFs in and produces a DF. That cannot really be in this same pattern, it needs a float_extend added (you can do all kinds of trickery, but just adding a few extra patterns is much easier than define_subst and whatnot). > Also, faddl and daddl functions take long double as argument, can they > also be expanded on DF to SF mode or only on QP float on power9? We can have three different long double modes on powerpc: DP float, QP float, or "IBM long double", also known as "double double", which is essentially the sum of two double precision numbers. Types (a source level construct) are not the same as modes (an RTL concept). Segher