From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 183953947427 for ; Mon, 3 Jun 2024 02:37:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 183953947427 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 183953947427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717382247; cv=none; b=NBFLOnfmO3CWATH2xynJ+DGyUjj2d0APFnLsmUz7Ats7hpMaPzmfVFnXTP0IlMMokEGKr9MzGHw2vG0ghhpmcOQAZT0qyQ1l52NTj2+ydEeE/I8Qhwne/actn/XWZU1UNmTtwr1yCre0vHcpOwKMEtkd9AuN+vGHe/ES6CxktWM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717382247; c=relaxed/simple; bh=xIxeBLIdlXXOqTfODFcOQ8lTDirglroSUqWRuJyoYOY=; h=DKIM-Signature:Message-ID:Date:Subject:From:To:MIME-Version; b=pJb8uH/4oBrQKWYICMo42WZobr6uptcK/BV1LVUJLzEctFIQBOCmmFeJ9uH75jMsjoS1fPNHC7R3LHH23omyA6+JlNQ/ESn8GN7eGK8JC3on0RzxS/nMOB4QODUrzttwZjlqciH8UH2El/z4kURvnSDtnDx3BG0ZiDq2hEQYCeQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4531u5Su009374; Mon, 3 Jun 2024 02:37:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc : content-transfer-encoding : content-type : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pp1; bh=vENvgNCVJk/G/lN9m6EaVCLg2f5/jADvbQeCEb4aLE0=; b=Pv3xp+gyPRyk1UCd0bZmUBK/dD+9oPpqLMvhlqvvo3i647uh8iUY8+IWLTYSLnr+JdNg aelg5HWnbJ4R19+y8Lp0mX4/ArgFmqqImQjevS6R1MJJ5r5W/Gu6NQzWO14aZlhVmQLH apS9GebztNezfdBZzkSMXyyI7eFnpgPHcGu9WCl++7QgpAuKOdVAvUwlhIDEnR0hEi0t BT+lhYDVJ0a+xp08afATL0hrw06BeHxZRCJo9PZeNwjGIakd3/llbx7Jiy0GCSWETouK WYJB4sgptLhKHxvZ9xGxwKzkjn4uWssEIVbNhgBQLP1Oz3RiOxnRAQ6n2eFeXt3B7vxV ow== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yh3a306ma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 02:37:22 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4532bM1F004087; Mon, 3 Jun 2024 02:37:22 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yh3a306m8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 02:37:22 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4531Q7dU008468; Mon, 3 Jun 2024 02:37:21 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ygec0dgyd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 02:37:21 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4532bFic51773726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2024 02:37:17 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE96820049; Mon, 3 Jun 2024 02:37:15 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 15E9B20040; Mon, 3 Jun 2024 02:37:13 +0000 (GMT) Received: from [9.197.235.136] (unknown [9.197.235.136]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jun 2024 02:37:12 +0000 (GMT) Message-ID: Date: Mon, 3 Jun 2024 10:37:13 +0800 User-Agent: Mozilla Thunderbird Subject: Ping [PATCHv5] Optab: add isnormal_optab for __builtin_isnormal From: HAO CHEN GUI To: gcc-patches Cc: Segher Boessenkool , David , "Kewen.Lin" , Peter Bergner , Andrew Pinski , Richard Biener , Richard Sandiford References: <1a0ffcad-f455-472c-90b7-0c712896837f@linux.ibm.com> Content-Language: en-US In-Reply-To: <1a0ffcad-f455-472c-90b7-0c712896837f@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 120PIHbfz-2TwRJnoOxBMMaBvaAEmKQA X-Proofpoint-ORIG-GUID: lWdgLknoVqIla-TsrLzEUB3FGE9SSd_R 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-06-02_15,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 priorityscore=1501 mlxlogscore=846 mlxscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406030021 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,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, All issues were addressed. Gently ping it. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653001.html Thanks Gui Haochen 在 2024/5/29 14:36, HAO CHEN GUI 写道: > Hi, > This patch adds an optab for __builtin_isnormal. The normal 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 specify return > value of the optab should be either 0 or 1. > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652865.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 isnormal_optab for isnormal builtin > > gcc/ > * builtins.cc (interclass_mathfn_icode): Set optab to isnormal_optab > for isnormal builtin. > * optabs.def (isnormal_optab): New. > * doc/md.texi (isnormal): Document. > > > patch.diff > diff --git a/gcc/builtins.cc b/gcc/builtins.cc > index 53e9d210541..89ba56abf17 100644 > --- a/gcc/builtins.cc > +++ b/gcc/builtins.cc > @@ -2463,6 +2463,8 @@ interclass_mathfn_icode (tree arg, tree fndecl) > builtin_optab = isfinite_optab; > break; > case BUILT_IN_ISNORMAL: > + builtin_optab = isnormal_optab; > + break; > 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 3eb4216141e..4fd7da095fe 100644 > --- a/gcc/doc/md.texi > +++ b/gcc/doc/md.texi > @@ -8563,6 +8563,12 @@ Return 1 if operand 1 is a finite floating point number and 0 > otherwise. @var{m} is a scalar floating point mode. Operand 0 > has mode @code{SImode}, and operand 1 has mode @var{m}. > > +@cindex @code{isnormal@var{m}2} instruction pattern > +@item @samp{isnormal@var{m}2} > +Return 1 if operand 1 is a normal floating point number and 0 > +otherwise. @var{m} is a scalar floating point mode. Operand 0 > +has mode @code{SImode}, and operand 1 has mode @var{m}. > + > @end table > > @end ifset > diff --git a/gcc/optabs.def b/gcc/optabs.def > index dcd77315c2a..3c401fc0b4c 100644 > --- a/gcc/optabs.def > +++ b/gcc/optabs.def > @@ -353,6 +353,7 @@ 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 (isnormal_optab, "isnormal$a2") > OPTAB_D (issignaling_optab, "issignaling$a2") > OPTAB_D (ldexp_optab, "ldexp$a3") > OPTAB_D (log10_optab, "log10$a2")