From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22432 invoked by alias); 1 Oct 2015 15:59:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22367 invoked by uid 89); 1 Oct 2015 15:59:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Oct 2015 15:59:25 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZhgGP-0004Bd-8F from joseph_myers@mentor.com ; Thu, 01 Oct 2015 08:59:21 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Thu, 1 Oct 2015 16:59:19 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.82) (envelope-from ) id 1ZhgGM-000624-LC; Thu, 01 Oct 2015 15:59:18 +0000 Date: Thu, 01 Oct 2015 15:59:00 -0000 From: Joseph Myers To: Michael Matz CC: James Greenhalgh , "pinskia@gmail.com" , "gcc-patches@gcc.gnu.org" Subject: Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y); In-Reply-To: Message-ID: References: <1443707835-6888-1-git-send-email-james.greenhalgh@arm.com> <9593201B-9298-4529-A4DA-41B5DD6DCBFE@gmail.com> <20151001145126.GA3881@arm.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2015-10/txt/msg00092.txt.bz2 On Thu, 1 Oct 2015, Michael Matz wrote: > both cases. The catch is that strictly speaking (NaN * -1.0) needs to > deliver NaN, not -NaN (operations involving quiet NaNs need to provide > one of the input NaNs as result), and here both are not equivalent. OTOH > the sign of NaNs isn't specified, so I think we could reasonably decide to > not care about this case (it would have to be checked if the hardware > multiplication even follows that rule, otherwise it's moot anyway). "For all other operations, this standard does not specify the sign bit of a NaN result, even when there is only one input NaN, or when the NaN is produced from an invalid operation." (IEEE 754-2008, 6.3 The sign bit). So no need to care about this case. -- Joseph S. Myers joseph@codesourcery.com