From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 151A03858D39 for ; Wed, 31 Aug 2022 15:19:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 151A03858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62a.google.com with SMTP id w2so14470360pld.0 for ; Wed, 31 Aug 2022 08:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=w+1Sl5TETkBFKQX1XYDhA6hTnGrfRbSitYoHJ1rnM98=; b=HG0orrpnNVTw/7fcsu8wgh5Tc1JiD0XYDe7BlBDIi6jOByjvwrLwRuYHScta/Haz7m B/RhqOlfcGMlqeJzLMK63OE076PmeHWdcp4YFg1xm/AQ50g+XBmvDD0Yfo7+OydN5Mif Nbtx+aMZkoFgGVDDfCsKKmYyW/Es4n0f6ln2m6VCzOQDqdC0nGLXAnHssSatjsBATf6g db0qe4C5meNCjg0VqrdSGutni6HyvUrQl7zsDbK0fui1ga9cceNntWYhB6ZEztzVQdVj 1XDkQIf493iuTpZgqCONF2FRAsfRlJZ3254xz+S63lHHSV5xr8SZ42bvwQRv/DY8A0u5 NVOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=w+1Sl5TETkBFKQX1XYDhA6hTnGrfRbSitYoHJ1rnM98=; b=FhaBF0z81tH/sjX7wbKYkLe6d2wB1H9us6gMLhIMNbREZNlLRjSuidbYoSWPfWk2eZ SoukLqm6bNbeVIwmh/Z/75kXCQ5UIa0n8Ndf4b6G9v14yfcf+d1zHp3dJ5uJlQI8Gzvj CWSOOqrUv+4Vv3KABqbtzNuUtAkrNf5z4mrGrBfyLWqTtUPXmT+l6KTH8ce5l9BB8Xkx 0FyDVT8d8K/Onfr2ff88xDJJwPlFP0X4076GrC+n/3uCUaVu9k9oG+ot8TM9a/DWBC1a Y4EnC4AJe/aXatAuNUcw5CjoZDi4DTKBMRYRweFpUgukqr9YGgICYoBBk6AM1tEa4CH5 mKVA== X-Gm-Message-State: ACgBeo2vSX1WpCihD9b34owQInNU13ZmUmxveRCtAgG3CfCiHShv/wvI 2jwmocZ5QGYVi/Ilwi0cSCyczZWWl28= X-Google-Smtp-Source: AA6agR4rFqwGnJ+WlVL1j2BUlIavNkEhH6W3slUGh2URRrrv1E1s9r1lPPibUH0ogU86cJhbjyLrIQ== X-Received: by 2002:a17:90a:53a4:b0:1fa:97eb:6f0a with SMTP id y33-20020a17090a53a400b001fa97eb6f0amr3850549pjh.54.1661959182424; Wed, 31 Aug 2022 08:19:42 -0700 (PDT) Received: from [172.31.0.204] (c-73-98-188-51.hsd1.ut.comcast.net. [73.98.188.51]) by smtp.gmail.com with ESMTPSA id w8-20020a1709026f0800b00172c298ba42sm58553plk.28.2022.08.31.08.19.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Aug 2022 08:19:41 -0700 (PDT) Message-ID: Date: Wed, 31 Aug 2022 09:19:40 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] Add support for floating point endpoints to frange. Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <20220823114224.904934-1-aldyh@redhat.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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: On 8/29/2022 8:15 AM, Aldy Hernandez via Gcc-patches wrote: > On Mon, Aug 29, 2022 at 4:08 PM Toon Moene wrote: >> On 8/29/22 15:54, Jakub Jelinek via Gcc-patches wrote: >> >>> On Mon, Aug 29, 2022 at 03:45:33PM +0200, Aldy Hernandez wrote: >>>> For convenience, singleton_p() returns false for a NAN. IMO, it makes >>>> the implementation cleaner, but I'm not wed to the idea if someone >>>> objects. >>> If singleton_p() is used to decide whether one can just replace a variable >>> with singleton range with a constant, then certainly. >>> If MODE_HAS_SIGNED_ZEROS, zero has 2 representations (-0.0 and 0.0) and >>> NaNs have lots of different representations (the sign bit is ignored >>> except for stuff like copysign/signbit, there are qNaNs and sNaNs and >>> except for the single case how Inf is represented, all other values of the >>> mantissa mean different representations of NaN). So, unless we track which >>> exact form of NaN can appear, NaN or any [x, x] range with NaN property >>> set can't be a singleton. There could be programs that propagate something >>> important in NaN mantissa and would be upset if frange kills that. >>> Of course, one needs to take into account that when a FPU creates NaN, it >>> will create the canonical qNaN. >>> >>> Jakub >>> >> But the NaNs are irrelevant with -ffinite-math-only, as are the various >> Infs (I do not know offhand which MODE_ that is) ... > But even with -ffinite-math-only, is there any benefit to propagating > a known NAN? For example: In theory, yes, but I don't know if it's worth the headache in practice for NaNs, particularly given they can have many representations. Jeff