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 088743858CDA for ; Mon, 27 May 2024 02:10:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 088743858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 088743858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716775818; cv=none; b=m94CKmtsWLKwgNFt+MA50Va9FOYfv19C2HbMST/9VQJbVs99vVaJIas7EdeevAaGFVX3D2L5j8V0oUCTzQhT5ue5c1yoIe0IRQ0KMYW/qLw9oSaCdYuByr2869Tl78tEvZ/T0wbGFJ/rxSoSqKmmhNkWInDwv1c5nJHSdvr5kFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716775818; c=relaxed/simple; bh=TrLuXEUpzcrnMYiiCpsl769wQTl1/VXtwTgAmIu6IBQ=; h=DKIM-Signature:Message-ID:Date:Subject:From:To:MIME-Version; b=bCuQhHo/cHBLSML1Ky6zWRWW0zS95Vcsxmolfupo18EhUHBktg/QPgz9YUsnUHh0Zx5A+ZnrZrxT3Rqzba97qKZJ3+CnFnFp+WSH926IRbxXW4KU3eBqUg8Mlc088VAh/fgYLD+9dcetjI1lZkdpIz117gdNx20ajFe4KjjrfLA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44R0lnSa004272; Mon, 27 May 2024 02:10:13 GMT DKIM-Signature: =?UTF-8?Q?v=3D1;_a=3Drsa-sha256;_c=3Drelaxed/relaxed;_d=3Dibm.com;_h=3Dcc?= =?UTF-8?Q?:content-transfer-encoding:content-type:date:from:in-reply-to:m?= =?UTF-8?Q?essage-id:mime-version:references:subject:to;_s=3Dpp1;_bh=3Dj1R?= =?UTF-8?Q?2di45mHDB0bhkZPvR9gNZsfRXik6/eUuD5YMmOyA=3D;_b=3DEcB5dw6AM5xRO0?= =?UTF-8?Q?EvzqexBC+vvqC5Ayk+7a4jr5yOdjJ0wCYt67yxRQZV48CDFLyunZUV_7fJZtihr?= =?UTF-8?Q?T5sUgsP1kdagz2icSqjRnRkEc5jzy/fzZ4q0Gvrdb5SxyLKW36KlxqUe41lL_NM?= =?UTF-8?Q?qFb5FunCBlonIMmxFrjOIokdTndaO0qu9POD8JeEsqwKYd53DZtTm7o8NzLjun0?= =?UTF-8?Q?lPR_favq5hTi/0B5cQ14iqePdpoThNI40YSOSnyNyhNvBrpHDlkxmOXl7ENhNW5?= =?UTF-8?Q?n7msnHHl1_RTiCW0yH9tD+hajp97v0rv8UX8nL6Y2P9vu6neBYZlWK/ClwQ1Hxu?= =?UTF-8?Q?OCyiQ6TRWp9QkaN_ZA=3D=3D_?= Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ycfxdg4k6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 May 2024 02:10:12 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 44R2AC1c002291; Mon, 27 May 2024 02:10:12 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ycfxdg4k0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 May 2024 02:10:12 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44QNeAOb027260; Mon, 27 May 2024 02:10:11 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3ybvhkdwwc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 May 2024 02:10:10 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44R2A55m31260990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 May 2024 02:10:07 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8159B20043; Mon, 27 May 2024 02:10:05 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7BA4D2004D; Mon, 27 May 2024 02:10:02 +0000 (GMT) Received: from [9.69.93.222] (unknown [9.69.93.222]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 27 May 2024 02:10:02 +0000 (GMT) Message-ID: <111b2b41-79aa-47cf-968b-a22ef6929ec0@linux.ibm.com> Date: Mon, 27 May 2024 10:10:01 +0800 User-Agent: Mozilla Thunderbird Subject: Ping [PATCHv2] Optab: add isfinite_optab for __builtin_isfinite From: HAO CHEN GUI To: gcc-patches Cc: Segher Boessenkool , David , "Kewen.Lin" , Peter Bergner , Andrew Pinski , Richard Biener References: <37f328b1-ad76-4083-a85c-3fc0df574c72@linux.ibm.com> Content-Language: en-US In-Reply-To: <37f328b1-ad76-4083-a85c-3fc0df574c72@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: NSJXIQkigG5UIc6WwKTOkNqQip7_eWmt X-Proofpoint-ORIG-GUID: TpVZ6s4dSnh73OhG3kFjIw5F9A_kJPBU Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-26_09,2024-05-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 spamscore=0 mlxlogscore=899 clxscore=1015 suspectscore=0 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405270016 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIM_INVALID,DKIM_SIGNED,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652170.html Thanks Gui Haochen 在 2024/5/20 16:15, HAO CHEN GUI 写道: > Hi, > This patch adds an optab for __builtin_isfinite. The finite check can be > implemented on rs6000 by a single instruction. It needs an optab to be > expanded to the certain sequence of instructions. > > The subsequent patches will implement the expand on rs6000. > > Compared to previous version, the main change is to document isfinite > in md.texi. > https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html > > Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no > regressions. Is this OK for trunk? > > Thanks > Gui Haochen > > ChangeLog > optab: Add isfinite_optab for isfinite builtin > > gcc/ > * builtins.cc (interclass_mathfn_icode): Set optab to isfinite_optab > for isfinite builtin. > * optabs.def (isfinite_optab): New. > * doc/md.texi (isfinite): Document. > > > patch.diff > diff --git a/gcc/builtins.cc b/gcc/builtins.cc > index f8d94c4b435..b8432f84020 100644 > --- a/gcc/builtins.cc > +++ b/gcc/builtins.cc > @@ -2459,8 +2459,9 @@ interclass_mathfn_icode (tree arg, tree fndecl) > errno_set = true; builtin_optab = ilogb_optab; break; > CASE_FLT_FN (BUILT_IN_ISINF): > builtin_optab = isinf_optab; break; > - case BUILT_IN_ISNORMAL: > case BUILT_IN_ISFINITE: > + builtin_optab = isfinite_optab; break; > + case BUILT_IN_ISNORMAL: > CASE_FLT_FN (BUILT_IN_FINITE): > case BUILT_IN_FINITED32: > case BUILT_IN_FINITED64: > diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi > index 5730bda80dc..8ed70b3feea 100644 > --- a/gcc/doc/md.texi > +++ b/gcc/doc/md.texi > @@ -8557,6 +8557,11 @@ operand 2, greater than operand 2 or is unordered with operand 2. > > This pattern is not allowed to @code{FAIL}. > > +@cindex @code{isfinite@var{m}2} instruction pattern > +@item @samp{isfinite@var{m}2} > +Set operand 0 to nonzero if operand 1 is a finite floating-point > +number and to 0 otherwise. > + > @end table > > @end ifset > diff --git a/gcc/optabs.def b/gcc/optabs.def > index ad14f9328b9..dcd77315c2a 100644 > --- a/gcc/optabs.def > +++ b/gcc/optabs.def > @@ -352,6 +352,7 @@ OPTAB_D (fmod_optab, "fmod$a3") > OPTAB_D (hypot_optab, "hypot$a3") > OPTAB_D (ilogb_optab, "ilogb$a2") > OPTAB_D (isinf_optab, "isinf$a2") > +OPTAB_D (isfinite_optab, "isfinite$a2") > OPTAB_D (issignaling_optab, "issignaling$a2") > OPTAB_D (ldexp_optab, "ldexp$a3") > OPTAB_D (log10_optab, "log10$a2")