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 A269D384D166 for ; Tue, 7 Jun 2022 20:45:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A269D384D166 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 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 257KiQjp026742; Tue, 7 Jun 2022 15:44:27 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 257KiQmS026741; Tue, 7 Jun 2022 15:44:26 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 7 Jun 2022 15:44:26 -0500 From: Segher Boessenkool To: HAO CHEN GUI Cc: gcc-patches , David , "Kewen.Lin" , Peter Bergner Subject: Re: [PATCH v3, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605] Message-ID: <20220607204426.GL25951@gate.crashing.org> References: <6c315e9c-f86b-5704-feea-73e434ecffee@linux.ibm.com> <20220601210129.GX25951@gate.crashing.org> <10ddd127-6e61-3699-a3f2-f9141d127af5@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <10ddd127-6e61-3699-a3f2-f9141d127af5@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.2 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 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, 07 Jun 2022 20:45:28 -0000 Hi! On Tue, Jun 07, 2022 at 09:51:43AM +0800, HAO CHEN GUI wrote: > On 2/6/2022 上午 5:01, Segher Boessenkool wrote: > > On Wed, May 18, 2022 at 04:52:26PM +0800, HAO CHEN GUI wrote: > >> const double __builtin_vsx_xsmaxdp (double, double); > >> - XSMAXDP smaxdf3 {} > >> + XSMAXDP fmaxdf3 {} > >> > >> const double __builtin_vsx_xsmindp (double, double); > >> - XSMINDP smindf3 {} > >> + XSMINDP fmindf3 {} > > > > Are s{min,max}df3 still used after this? > > Expands reduc_s[min|max]_scal are still using s[min|max]df3. Ah, and reduction is undefined for float unless fast-math anyway. Okay. > Also we could implement reduc_f[min|max]_scal after committing > this patch. Because fmin and fmax treat NaNs as missing data. But you have to be careful with SNaNs here, probably just skip most of this when -fsignaling-nans is used. It also still needs -fno-signed-zeros btw, but not full -ffast-math indeed. Segher