From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id F32AD398305C for ; Tue, 15 Sep 2020 21:21:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F32AD398305C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 08FLKIm1007143; Tue, 15 Sep 2020 16:20:18 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 08FLKHRf007138; Tue, 15 Sep 2020 16:20:17 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 15 Sep 2020 16:20:17 -0500 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, David Edelsohn , Bill Schmidt , Peter Bergner Subject: Re: [PATCH 4/4] PowerPC: Add power10 xscmp{eq,gt,ge}qp support Message-ID: <20200915212017.GV28786@gate.crashing.org> References: <20200827024142.GA15560@ibm-toto.the-meissners.org> <20200827024637.GD21803@ibm-toto.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200827024637.GD21803@ibm-toto.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2020 21:21:21 -0000 On Wed, Aug 26, 2020 at 10:46:37PM -0400, Michael Meissner wrote: > diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md > index 2709e46f7e5..60b45601e9b 100644 > --- a/gcc/config/rs6000/predicates.md > +++ b/gcc/config/rs6000/predicates.md > @@ -1225,6 +1225,11 @@ (define_predicate "fpmask_comparison_operator" > (define_predicate "invert_fpmask_comparison_operator" > (match_code "ne,unlt,unle")) > > +;; Return 1 if OP is either a fpmask_comparison_operator or > +;; invert_fpmask_comparsion_operator. > +(define_predicate "fpmask_normal_or_invert_operator" > + (match_code "eq,gt,ge,ne,unlt,unle")) Keep "comparison" in the name? Maybe "any_fpmask_comparison_operator", we have other things named in that scheme already. > --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -15177,6 +15177,10 @@ have_compare_and_set_mask (machine_mode mode) > case DFmode: > return TARGET_P9_MINMAX; > > + case KFmode: > + case TFmode: > + return FLOAT128_IEEE_MINMAX_P (mode); That needs the E_ stuff as well. > +;; Secondary iterator for scalar binary floating point operations. This is > +;; used for the conditional moves when we have a compare and set mask > +;; instruction. Using this instruction allows us to do a conditional move > +;; where the comparison type might be different from the values being moved. > +(define_mode_iterator FSCALAR2 [SF > + DF > + (KF "FLOAT128_IEEE_MINMAX_P (KFmode)") > + (TF "FLOAT128_IEEE_MINMAX_P (TFmode)")]) Needs a name change just like FSCALAR. Maybe BFP? Or better, just FP, and rename the current FP to something else (it is only used for cstore and cbranch, it should use a much less generic name there). Please cut down the comment. See GPR/GPR2 for example: ; This mode iterator allows :GPR to be used to indicate the allowable size ; of whole values in GPRs. (define_mode_iterator GPR [SI (DI "TARGET_POWERPC64")]) ; And again, for patterns that need two (potentially) different integer modes. (define_mode_iterator GPR2 [SI (DI "TARGET_POWERPC64")]) It should not talk about an example where it is used: it can much easier say something much more generic! (And then send a patch first doing FP just as SFDF and replacing it where we want it; and then a later patch adding KF. That way, your patch might be readable!) Thanks, Segher