From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 7B9763858028 for ; Wed, 14 Apr 2021 20:48:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7B9763858028 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13EKYVlV014065; Wed, 14 Apr 2021 16:48:13 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 37x5s4ajfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 16:48:12 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13EKYfkd015236; Wed, 14 Apr 2021 16:48:12 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 37x5s4ajf4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 16:48:12 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13EKl3bW001149; Wed, 14 Apr 2021 20:48:11 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma03dal.us.ibm.com with ESMTP id 37u3n9n4m6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Apr 2021 20:48:11 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13EKm9JM33423626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Apr 2021 20:48:09 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D99D6A04D; Wed, 14 Apr 2021 20:48:09 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F8F46A051; Wed, 14 Apr 2021 20:48:08 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.160.34.242]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTPS; Wed, 14 Apr 2021 20:48:08 +0000 (GMT) Date: Wed, 14 Apr 2021 16:48:06 -0400 From: Michael Meissner To: Segher Boessenkool Cc: Michael Meissner , gcc-patches@gcc.gnu.org, David Edelsohn , Bill Schmidt , Peter Bergner , Will Schmidt Subject: Re: [PATCH 2/2] Add IEEE 128-bit min/max support on PowerPC Message-ID: <20210414204806.GA15975@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , Segher Boessenkool , gcc-patches@gcc.gnu.org, David Edelsohn , Bill Schmidt , Peter Bergner , Will Schmidt References: <20210409143800.GA12782@ibm-toto.the-meissners.org> <20210409144358.GB14459@ibm-toto.the-meissners.org> <20210414193847.GE26583@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210414193847.GE26583@gate.crashing.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-GUID: wVdfag-NO103D-qmkD9KyIDL86qnprFA X-Proofpoint-ORIG-GUID: ZKGAODgwpBUCpuNUY4aAI-UV7oW9--hM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-14_12:2021-04-14, 2021-04-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104140132 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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: Wed, 14 Apr 2021 20:48:16 -0000 On Wed, Apr 14, 2021 at 02:38:47PM -0500, Segher Boessenkool wrote: > On Fri, Apr 09, 2021 at 10:43:58AM -0400, Michael Meissner wrote: > > (Fv mode attribute): Add KFmode and TFmode. > > (movcc_fpmask): Replace > > movcc_p9. Add IEEE 128-bit fp support. > > (movcc_invert_fpmask): Replace > > movcc_invert_p9. Add IEEE 128-bit fp > > support. > > (fpmask): Add IEEE 128-bit fp support. Enable generator to > > build te RTL. > > (xxsel): Add IEEE 128-bit fp support. Enable generator to > > build te RTL. > > > @@ -608,8 +621,13 @@ (define_mode_attr Ff [(SF "f") (DF "d") (DI "d")]) > > ; SF/DF constraint for arithmetic on VSX registers using instructions added in > > ; ISA 2.06 (power7). This includes instructions that normally target DF mode, > > ; but are used on SFmode, since internally SFmode values are kept in the DFmode > > -; format. > > -(define_mode_attr Fv [(SF "wa") (DF "wa") (DI "wa")]) > > +; format. Also include IEEE 128-bit instructions which are restricted to the > > +; Altivec registers. > > +(define_mode_attr Fv [(SF "wa") > > + (DF "wa") > > + (DI "wa") > > + (KF "v") > > + (TF "v")]) > > Eww. Please just split the patterns. Fv should just go away, it is > always "wa" currently. Removing that cascades to more cleanups, which > is why I haven't done it yet, it takes time. The problem is you have a combinatorial explosion. Right now, there are two patterns, one for the normal move, and one for the inverted move. Without doing a cascaded combination, you would need some 32 patterns to cover all of the possibilities. Or you give up on having a conditional move that compares one type and moves a second: _Float128 a, b; double c, d, r; r = (a == b) ? c : d; As I recall when I put the original logic in, there were a few places that did this mixed comparison between SF/DF modes was used in real code. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.ibm.com, phone: +1 (978) 899-4797