From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id CB1983857026 for ; Tue, 22 Sep 2020 03:39:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CB1983857026 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08M3VUN6159036; Mon, 21 Sep 2020 23:39:31 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 33q8qc14pq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Sep 2020 23:39:31 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 08M3Xj0H164289; Mon, 21 Sep 2020 23:39:31 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 33q8qc14pj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Sep 2020 23:39:31 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08M3S4YL032542; Tue, 22 Sep 2020 03:39:30 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04wdc.us.ibm.com with ESMTP id 33n9m8ux3u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Sep 2020 03:39:30 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08M3dT0k51315124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Sep 2020 03:39:29 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 087DA78060; Tue, 22 Sep 2020 03:39:29 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59BB17805C; Tue, 22 Sep 2020 03:39:28 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.160.88.183]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTPS; Tue, 22 Sep 2020 03:39:28 +0000 (GMT) Date: Mon, 21 Sep 2020 23:39:26 -0400 From: Michael Meissner To: gcc-patches@gcc.gnu.org, Michael Meissner , Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner Subject: [PATCH 0/2] Rework adding Power10 IEEE 128-bit min, max, and conditional move Message-ID: <20200922033926.GA29022@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-22_03:2020-09-21, 2020-09-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=999 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009220026 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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: Tue, 22 Sep 2020 03:39:33 -0000 These patches are my latest versions of the patches to add IEEE 128-bit min, max, and conditional move to GCC. They correspond to the earlier patches #3 and #4 (patches #1 and #2 have been installed). The first patch just adds support for the xsmincqp and xsmaxcqp instructions. Due to the NaN rules, this patch will only generate the minc/maxc instructions if -ffast-math is used. Unlike the previous patch, I did not try to combine min/max for IEEE 128-bit with the existing power9 min/max for SF/DF mode. Instead, I just created a new insn (without a generator for it). The second patch adds the support for doing a conditional move, where the comparison is one of the 4 binary floating point scalar types. The types being moved do not have to be the same as the types for comparison. Unlike the previous patches, I did not try to combine the normal comparison and the reversed comparison into one insn. Instead, I kept the two insns. After using it for awhile, I did not like using SFDFKFTF as the mode for all 4 floating point types. Instead, I used FPMASK and FPMASK2 for the cases that we generate the compare and set mask instruction to do the conditional move. As with power9, the conditional move allows some forms of min/max to be generated without using -ffast-math, assuming the tests give the right results for NaN's. I have built bootstrapped compilers with/without these patches, and there were no regressions in the test suite. Can I check these patches into the master branch? I do not anticipate needing to back port these changes to GCC 10. -- 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