From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id E5896385840B for ; Thu, 4 Nov 2021 18:32:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5896385840B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: UUzqb4nwiBRmbXHxqwHtGJVO5M801rqs8W1hs9Xce+9m1ug+RMREqzjWtoNRUlUL5gNi+hXfBO 8OmfZODLrFFpp/gWL6xumDNUr65j9eVXhPTNZEaZaxMZr3z9aymlDF6Ug6L6SpqyIJ2G1T5VEj Kl7XHyDUNTODOzZhZpKJIP+OrweRwNod7gL8KQjzNAAwVTiq70H/JJ10tjca+/9+boHwLjdRJZ uTcgBj3VZb2wFg+A5rfbzcAalk4O3DMtwn0fft//kG76EQcwDwwP6APb8whtoQ0EOHQtEnFGnw LOhNvtIOrKauU8MNdpj9dhaS X-IronPort-AV: E=Sophos;i="5.87,209,1631606400"; d="scan'208";a="68069823" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 04 Nov 2021 10:32:55 -0800 IronPort-SDR: T53Z1Wjr6quSO1ox/KyIzhqblBfiem+nnbvWVHXvvpAhextdCQnXUwjH+40gc5TZcdYpI3vh5P qwTFPN9u1kwzV9Uzv0eyOe4Xhn49d60iLi6YGcePzbnLGf0GYdoHLQ8P1oS+RnmNT80vJ4xbOA KiIs+zG29/KuCZo5xcH+A6SRryP6pnjUKgX/ZmkRG/9KU+BCqTb0rcspVbLFHT5uZlwR3bxLoh XJ58K+Jl4r42nt/nhPLN4xj7/FWx5KzMey2hG+FLrAAGoi7qHrpDctrtUeV9cITMKgHpQTsADc ic4= Date: Thu, 4 Nov 2021 18:32:51 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: liuhongt CC: Subject: Re: [PATCH 1/2] [Middle-end] Simplify (trunc)copysign((extend)a, (extend)b) to .COPYSIGN (a, b). In-Reply-To: <20211104064510.93649-1-hongtao.liu@intel.com> Message-ID: References: <20211104064510.93649-1-hongtao.liu@intel.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3117.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 04 Nov 2021 18:32:58 -0000 On Thu, 4 Nov 2021, liuhongt via Gcc-patches wrote: > a and b are same type as the truncation type and has less precision > than extend type. Note that this is not safe with -fsignaling-nans, so needs to be disabled for that option (if there isn't already logic somewhere with that effect), because the extend will convert a signaling NaN to quiet (raising "invalid"), but copysign won't, so this transformation could result in a signaling NaN being wrongly returned when the original code would never have returned a signaling NaN. -- Joseph S. Myers joseph@codesourcery.com