From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 211943858D32 for ; Mon, 29 Aug 2022 14:36:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 211943858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661783815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R4RnPXBcY//Su9Z82bHyRoOfyLqOBvbKhiA60wpIwzM=; b=WhEnXWIxPvGHi9ZQxh58nUZ8HyjPP9QGba5tNSKBEt3frEqSc0EU7urzGLtlnlgGMT7XtS b4ZJp8yJcwvxauxO0TlesCzpcWlogUwfqz7pASI2gKWv1riqoH3Bvq26XiOstfTlivhQ1F nIoNjRvgdVk99TIUMZW+NK/pndBcr6s= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-459-Wets7F34P46_QiFwTn6Qzg-1; Mon, 29 Aug 2022 10:36:54 -0400 X-MC-Unique: Wets7F34P46_QiFwTn6Qzg-1 Received: by mail-oi1-f200.google.com with SMTP id v6-20020acaac06000000b00342fc367786so2585857oie.4 for ; Mon, 29 Aug 2022 07:36:54 -0700 (PDT) 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; bh=R4RnPXBcY//Su9Z82bHyRoOfyLqOBvbKhiA60wpIwzM=; b=FzBAZDJfYMzChx42MnsTXmY7/9VWQoL9aPh1KaQVaNBEnf932zGEvtFdZc9MoxDKsx XZf7EEjZ3FBTu12OVEXpAHzGK32S/wyovIqPEtF5/oN5W9VUglcnaDOdwrTMeiWtB2FN lifQIaL5/tzenY+KnLxAM/zf2Zx9XD8LkCbuGFnfnWCxkCK9fw2dAJ4fgpJKNqnIDpJY GXpaRbzIgtfD3NcROokHTIBMUnSwd2iiPibQe2PwfQCoxq9rrdvK8DbJjhsoZzkydP/v ETm/Vtczv6EIBSn/dUuxfO5Xi9HTizsuR0SAShfQpdjblWwvnYL+JKA7PEOxWHadgJW1 HlpA== X-Gm-Message-State: ACgBeo1stGjdI/NsiCI8+JEK0Q+K+RcWLkyrTgGDT0JkmbNed4tGvgSW VF57ly7tlAU2zXUc/Oybm+tsc6jHTZjNZ0oJ9XanJ1lD+esXo4B9DxnbPghqLYrtRkAnoPDG+Ik KgX4EasJjanwCapGl+eTACV8Gn4CNMPp42Q== X-Received: by 2002:a05:6870:210b:b0:10b:ed11:4e2d with SMTP id f11-20020a056870210b00b0010bed114e2dmr8036352oae.265.1661783814016; Mon, 29 Aug 2022 07:36:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR5No++oyMi82V44qDg0mh/0cJfsUhTwfmeg6Ea6xlV4EuFwHbK9Ujk+68BsikG1vofMZQkcLIn4iYphgfqwTFc= X-Received: by 2002:a05:6870:210b:b0:10b:ed11:4e2d with SMTP id f11-20020a056870210b00b0010bed114e2dmr8036343oae.265.1661783813794; Mon, 29 Aug 2022 07:36:53 -0700 (PDT) MIME-Version: 1.0 References: <20220823114224.904934-1-aldyh@redhat.com> In-Reply-To: From: Aldy Hernandez Date: Mon, 29 Aug 2022 16:36:42 +0200 Message-ID: Subject: Re: [PATCH] Add support for floating point endpoints to frange. To: Toon Moene , Jakub Jelinek Cc: gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,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, Aug 29, 2022 at 4:30 PM Toon Moene wrote: > > On 8/29/22 16:15, Aldy Hernandez wrote: > > > But even with -ffinite-math-only, is there any benefit to propagating > > a known NAN? For example: > > The original intent (in 2002) for the option -ffinite-math-only was for > the optimizers to ignore all the various exceptions to common > optimizations because they might not work correctly when presented with > a NaN or an Inf. > > I do not know what the effect for floating point range information would > be - offhand. > > But in the *spirit* of this option would be to ignore that the range > [5.0, 5.0] would "also" contain NaN, for instance. Hmm, this is somewhat similar to what Jakub suggested. Perhaps we could categorically set !NAN for !HONOR_NANS at frange construction time? For reference: bool HONOR_NANS (machine_mode m) { return MODE_HAS_NANS (m) && !flag_finite_math_only; } Thanks. Aldy