From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id A9B823858D32 for ; Mon, 5 Sep 2022 09:18:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A9B823858D32 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-ej1-x634.google.com with SMTP id lx1so15723805ejb.12 for ; Mon, 05 Sep 2022 02:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=x3duArPbsEVCDoWB/9qPCqfohoka4HOEbiMSDpATK4M=; b=Uix0vrCe0s2gwJv6Qg61i5lv+2ZNAkNW/PGKu9HIqc1LCpYUv8KRA1t5/sdd0OBj2F Xp2tryvMK414OkN8JpXmZAyq9yu8+B9AlohexaLP9+/z5rjY3EhuV+0ZLNly6tElo4Ie W47YfT8Jc0UyuNB8XjBvwGs6kSIz8ZQGNFbWj1HxdQvhhmvLLTtlTLCMl9F/Sir3aUpC ZUf/d9uFhtfDtWxhru6XyZI1IE+NGUZhT3XOmhNf0BSwYe6KcrF8CNkBy5G1i64ZOmKv SoArl5a6NMhT4Z481sHGqYCVgu3gdRJIFl2IsptutOfvy2xzgRORT1lYn7QKS2f1lURf 3FlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=x3duArPbsEVCDoWB/9qPCqfohoka4HOEbiMSDpATK4M=; b=woDqcn11afCCsYP+95zfVcGAsVlP0SUw9TQlT5V8aUSjfGbsMrmLiYKmwtdFNCZIlD OawtwhbvcEehFtcoTfy8uVXX/IhlBmtcqF2zXU5crlyzfuF/sJ311G6lASZkIY0vHwAt d8Kg3ix3NPY2w0m04wCnhY9nwKJtAOGJJSgTUE5dzzgV10GvKXsU3KX5gtGbsBhSMlee U07Du3Zke8P2ePGGLeZuBgwg9Nau4NArl0h9NmZ6j25YU+nkxwGKVgYryz7u79zT+Q0H 1Xw1kYlhlHmfSxpUJ+bdwNEvBVYnEAKkBvxQbEX0GJ/g5Kn30yb8W9wiBSijn5Iwa5ll 4M8Q== X-Gm-Message-State: ACgBeo1t5tdPJv/b+Y91H4823mHujA+wNTg4j8F1rB6ErL9giX8Mretm Jt9fEXQcwtwEdZKA6s8Hz7Ik7Q1qt5ksJ4hrmbE= X-Google-Smtp-Source: AA6agR60K0NwMYH/PHCJWqB3f35RIFKAio5Xb0cfhv4JcYV8SKqgOFBQmCuu4W0MwiS21XCpY89tYK/A6bum8ejt2gM= X-Received: by 2002:a17:906:8a68:b0:741:56b2:af42 with SMTP id hy8-20020a1709068a6800b0074156b2af42mr27670211ejc.488.1662369492476; Mon, 05 Sep 2022 02:18:12 -0700 (PDT) MIME-Version: 1.0 References: <20220905062301.3240191-1-aldyh@redhat.com> In-Reply-To: From: Richard Biener Date: Mon, 5 Sep 2022 11:18:00 +0200 Message-ID: Subject: Re: [COMMITTED] Be even more conservative in intersection of NANs. To: Aldy Hernandez Cc: Jakub Jelinek , "MacLeod, Andrew" , GCC patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 Mon, Sep 5, 2022 at 11:12 AM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 11:06 AM Jakub Jelinek wrote: > > > > On Mon, Sep 05, 2022 at 11:00:54AM +0200, Richard Biener wrote: > > > On Mon, Sep 5, 2022 at 8:24 AM Aldy Hernandez via Gcc-patches > > > wrote: > > > > > > > > Intersecting two ranges where one is a NAN is keeping the sign bit of > > > > the NAN range. This is not correct as the sign bits may not match. > > > > > > > > I think the only time we're absolutely sure about the intersection of > > > > a NAN and something else, is when both are a NAN with exactly the same > > > > properties (sign bit). If we're intersecting two NANs of differing > > > > sign, we can decide later whether that's undefined or just a NAN with > > > > no known sign. For now I've done the latter. > > > > > > > > I'm still mentally working on intersections involving NANs, especially > > > > if we want to keep track of signbits. For now, let's be extra careful > > > > and only do things we're absolutely sure about. > > > > > > > > Later we may want to fold the intersect of [NAN,NAN] and say [3,5] > > > > with the posibility of NAN, to a NAN, but I'm not 100% sure. > > > > > > The intersection of [NAN, NAN] and [3, 5] is empty. The intersection > > > of [NAN, NAN] and VARYING is [NAN, NAN]. > > > > I think [3.0, 5.0] printed that way currently means U maybe NAN, > > it would be [3.0, 5.0] !NAN if it was known not to be NAN. > > Right. I don't print any of the "maybe" properties, just if they're > definitely set or definitely clear. I'm open to suggestions as to how > to display them. Perhaps NAN, !NAN, ?NAN. There's no NAN tristate. Your "definitely NAN" would be simply ][ NAN, that is, the value range only contains NAN. Your !NAN is and non NAN. Likewise for the sign, the range either includes -NAN and NAN or one or none of those. For signed zeros you either have [-0, upper-bound] or [0, upper-bound] where it either includes both -0 and 0 or just one of them > I'm mostly worried about removing a NAN from the IL that was going to > signal, or some such. While I agree with you Richard, I just want to > make real sure, because getting something wrong in the frange or > range-ops bowels means the problem becomes pervasive to all of ranger > ...and threader...and loop ch...and vrp, etc etc. I just want to take > more time to test things. I promise it won't stay varying too long. There's sNANs and qNANs, but I think for value-ranges we should concern ourselves only with qNANs for now and leave sNANs VARYING. All operations only ever produce qNANs (loads can produce sNANs). Richard. > Aldy >