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 A0A3B386D604 for ; Tue, 28 May 2024 22:20:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A0A3B386D604 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A0A3B386D604 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716934858; cv=none; b=LqqjZptVx2+OGRYyZ6EoKnX7JDyRy65wl23Klxu4ePJ7ipcz72O0Q2kOZMJYQhvt3UFG1WIHu1RSmv6CRIAAIFQom7Gg2nV6RyYg4mlRn4sZGrFYniAGAp+Ek88vV/I4defVjFGXQA1vjygY8BKED3z+J4toGFWXTx5Taj6y5ic= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716934858; c=relaxed/simple; bh=Rvsb9Wo/tg/GlgRpgAPYj9kUh0OPFisRBls0ppCSqFw=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=KhQtLSmI5aCbpmOFOlUgWMeb3pdDwPqdzzrdExd+r3Y8xzKG2bJKplA2pqVNmkM5WKjKmcEppGHFnx47BKJpopPUpdZky4e+dwPhesrhoT3WlHohDIQQR0Q2pjAAMPZSLOfqpGNlBD0ZaqaPZ7Q77Jv5IFJ8y7OrYRxcV5j9Z+8= ARC-Authentication-Results: i=1; server2.sourceware.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 44SMJvFQ030903; Tue, 28 May 2024 17:19:57 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 44SMJuwd030902; Tue, 28 May 2024 17:19:56 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 28 May 2024 17:19:56 -0500 From: Segher Boessenkool To: HAO CHEN GUI Cc: gcc-patches , David , "Kewen.Lin" , Peter Bergner , Andrew Pinski , Richard Biener Subject: Re: [PATCHv3] Optab: add isfinite_optab for __builtin_isfinite Message-ID: <20240528221956.GW19790@gate.crashing.org> References: <936073f2-dfd4-4650-9b28-b905d97be477@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <936073f2-dfd4-4650-9b28-b905d97be477@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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! On Mon, May 27, 2024 at 05:37:23PM +0800, HAO CHEN GUI wrote: > --- 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; This needs a line break after the first ; (like after *any* semicolon in C). It is rather important that every "break;" stands out :-) > +@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 @code{SFmode}, > +@code{DFmode}, or @code{TFmode} floating point number and to 0 > +otherwise. operand 0 is the output of the builtin, right? So write that instead? "Return 1 if the operand (a scalar floating poiint number) is finite", or such? Segher