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.133.124]) by sourceware.org (Postfix) with ESMTPS id C2F0A3858C83 for ; Fri, 14 Oct 2022 15:06:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2F0A3858C83 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=1665759994; 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=DrEjvy89OUtQtOkFZETUldURQKhmeaiUvXoTtncOuoo=; b=esRbP0tvqN2XStF7IoOCIkWSsxWfk3HLxoeYEDggqxc8DVj2msATLoLLZeUUv8njSFPUie LxmCkZB1zibbGawpmWYUU06ixUx6VZ+r4Yk+/aezpVj37e9LJEGynME7mq01JwBwQOAsJn NAmZWDj2CvUOhYC03NbZqG00rGxtEvM= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-464-dC5veW6_MMefyphHhK57FA-1; Fri, 14 Oct 2022 11:06:32 -0400 X-MC-Unique: dC5veW6_MMefyphHhK57FA-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-358c893992cso47882187b3.9 for ; Fri, 14 Oct 2022 08:06:31 -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:subject:date:message-id :reply-to; bh=DrEjvy89OUtQtOkFZETUldURQKhmeaiUvXoTtncOuoo=; b=S+aU2jyDlw3AK1e4QwUlWptqJ1GjE+QE7VWco6VgfSwRv8hRUCtT32C1XRLHlImQ8R keVbugM3Zfz2p7oIYbQNu3gwPyrcgDEI4295sLmnPjWg4xKwdfOUQX6u6uSEAe7dGjQH 9b6WZn0kLZRoi1AEbPCAEaMj7oyqTYjCyW0xD9CcxAkJ+vJc1Inz8vhcwX7iOAtT3VbY 1uDsx1VqKxsElHq2AH6OlsCrIbDASUB9eEItm+inYzQwetbHF8hGWSySLvAMPO6/pugC Pe13go8NHbB08dqJ20LNX9uIU0o73FOUtRTO7qmMtyvXYv2jfgqGSES0KBqlxU4JuYv8 2A6Q== X-Gm-Message-State: ACrzQf1CqmiZOnEsXiyYEUJbu4z3E1PvYKgjJR70aP+wQILTtx9jGWDB SSZsyDP/MMI7RzdzYG5LkpQ3bWjBAMQEOuK6D/peSGgX8SCnUgPgE4RBjqCsSSYTJuhpinPbTuw MoJKitsPCylksDQsBvPUIMbCDnfIe8ZkMPw== X-Received: by 2002:a0d:e845:0:b0:358:49da:30a3 with SMTP id r66-20020a0de845000000b0035849da30a3mr5020113ywe.158.1665759990976; Fri, 14 Oct 2022 08:06:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73v2NFuKtKR4hQ0qDCIxOWUe/DgIfbiqV5TkTuB/u88jOuxfazeJB7+d6D8YSYac8MpGMvnMSOviVTD/Qm7MM= X-Received: by 2002:a0d:e845:0:b0:358:49da:30a3 with SMTP id r66-20020a0de845000000b0035849da30a3mr5020077ywe.158.1665759990673; Fri, 14 Oct 2022 08:06:30 -0700 (PDT) MIME-Version: 1.0 References: <20221014142652.671475-1-aldyh@redhat.com> In-Reply-To: From: Aldy Hernandez Date: Fri, 14 Oct 2022 17:06:19 +0200 Message-ID: Subject: Re: [COMMITTED] Drop -0.0 in frange::set() for !HONOR_SIGNED_ZEROS. To: 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=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP 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 Fri, Oct 14, 2022 at 5:00 PM Jakub Jelinek wrote: > > On Fri, Oct 14, 2022 at 04:53:13PM +0200, Aldy Hernandez wrote: > > > This looks wrong to me. > > > !HONOR_NANS is different from !HONOR_SIGNED_ZEROS. > > > The former says that either NaNs aren't supported or if they appear, > > > it will be UB. > > > The latter says that either -0.0 doesn't exist, or user doesn't care > > > if -0.0 or 0.0 is used. > > > > > > So, what you do is ok for !MODE_HAS_SIGNED_ZEROS (TYPE_MODE (m_type)), > > > but otherwise we want to canonicalize [x, -0.0] to [x, 0.0] and > > > [0.0, y] to [-0.0, y]. > > > > If the user doesn't care, I would expect they'd be ok with it being > > +0.0, but I must say, this is way beyond my paygrade. > > Unlike the NaN case where they can (easily) arrange for NaNs not to appear > (say, avoid numerically undefined operations), for +/-0 if the hardware > supports it they don't have much choice, sometimes computation will yield > one, sometimes the other. The option is "I don't use anything that depends > on the zero sign, which is e.g. copysign from zero, signbit or poking at the > bit patterns". > > > How does this patch in testing look? > > LGTM (perhaps some comment would be nice though). Ughh, can I trouble you for one, cause frankly I'm a bit lost on this one? Aldy