From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by sourceware.org (Postfix) with ESMTPS id C88B23858D28 for ; Fri, 24 Mar 2023 08:13:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C88B23858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-io1-f44.google.com with SMTP id k17so501314iob.1 for ; Fri, 24 Mar 2023 01:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679645598; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jOkM613p95gZjHeKrIrFWx3lcl825Z8vKW/mB1we4wg=; b=s1O5c41MNyI4CJ/jaY3EyG9mzq99ed+K7Wn5cNIUmvNABPWNiavZauTO38+DUngR5F U2UJWyxIv+2WNHVyWkYmKmbH3s8qJZiQx6T0qqX5/+iYPQZ2wAc8QjIBECjlCrIzzaiB fipTSgsgETAfdUx37jZ8PJFB1sU4jjP2Sv1zkuv21nz4qBrSnmz5iLebo5dCByfy0IGv gmjJDxqTTmmoe+OCqSzz44gjraoPxNuFvam+2scVoNPsfckmiYv9+oNrAuLZhkkx6FhN v0PekOAl2k+su8v18m9pB//EjhLseZHNXsnLWBcqcT3VnEUTqqRrdgibDm9PCPskMyGH S4yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679645598; h=content-transfer-encoding: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=jOkM613p95gZjHeKrIrFWx3lcl825Z8vKW/mB1we4wg=; b=DqMk9EsbAul+fiSTX5QL6P4dT1O2LD3jgMPcH5rUsHaSJGAIKSnrBJ5Vg9XbE2ogza avNitGRpcEQud+tWOVmA+j7C9GOi3ti7mUkGFj8fNUx9Oi+UjrRDRsxQHtc8PlL0B9xT +9oIJnSGeADTMypp3h7VgoB19a1ySq59RqxIqA7HAGV2EtPQO9wPbtv7k6ahni5ymp+L lDElZXLrPQzvGGZLkN6m5SNmp3t8N7xXoLCB4ktnvSnbyuFeJUJBlf8o/Yo4WIPM7V1K iDBtRi6tFiESHBurAK3/D5P+uICQESo0AuLxm89g08d/PFeS/tgTBevsjWcs6Y0jBQfu 5DiA== X-Gm-Message-State: AO0yUKWEXuJ2I0HUEe7V0NaJlnPlFhrsiFHgiRkGtUoHFMTMu/bGwlGZ QdbMDxmHcfs8tjg+6xcohTUrmQtNUtYu1evUn/lchmLJ3lGKmdQR+eg2CA== X-Google-Smtp-Source: AKy350YKbt5P4ckBwzguyb09WwyxqooY+q+vIDquhqnyeO22p7ri2du9AW5yJ70mLasvyljMLhSlEJ7xt/ftIWd5QV8= X-Received: by 2002:a05:6a00:99f:b0:62b:113b:72d7 with SMTP id u31-20020a056a00099f00b0062b113b72d7mr515219pfg.3.1679641941641; Fri, 24 Mar 2023 00:12:21 -0700 (PDT) MIME-Version: 1.0 References: <6659A77B-DA2F-40A6-BDBD-E8B29B9E901D@oracle.com> <87384938-FDB1-487B-8B03-7787996435B2@comcast.net> <7C6B7ED7-7AA4-47EF-8E44-E3AD81BF3E29@oracle.com> <4a670847-9728-e0cb-46f3-d476839f7cd4@gmail.com> <435162cb-99b5-1204-d723-ec3800e78997@ispras.ru> In-Reply-To: From: Fangrui Song Date: Fri, 24 Mar 2023 00:12:10 -0700 Message-ID: Subject: Re: Should -ffp-contract=off the default on GCC? To: Qing Zhao Cc: Richard Biener , Alexander Monakov , Jeff Law , gcc Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-18.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Wed, Mar 22, 2023 at 8:52=E2=80=AFAM Qing Zhao via Gcc-patches wrote: > > > > > On Mar 22, 2023, at 9:57 AM, Richard Biener via Gcc-patches wrote: > > > > On Wed, Mar 22, 2023 at 1:26=E2=80=AFPM Alexander Monakov wrote: > >> > >> > >> On Wed, 22 Mar 2023, Richard Biener wrote: > >> > >>> I think it's even less realistic to expect users to know the details = of > >>> floating-point math. So I doubt any such sentence will be helpful > >>> besides spreading some FUD? > >> > >> I think it's closer to "fundamental notions" rather than "details". Fo= r > >> users who bother to read the GCC manual there's a decent chance it wou= ldn't > >> be for naught. > >> > >> For documentation, I was thinking > >> > >> Together with -fexcess-precision=3Dstandard, -ffp-contract=3Doff > >> is necessary to ensure that rounding of intermediate results to preci= sion > >> implied by the source code and the FLT_EVAL_METHOD macro is not > >> omitted by the compiler. > > > > that sounds good to me > > Shall we add such clarification to our Gcc13 doc? That should be helpful = if we keep the currently default. > > Qing > > > >> Alexander > While updating the documentation, consider adding information that #pragma STDC FP_CONTRACT OFF is ignored with -ffp-contract=3Dfast. This surprising behavior motivated Clang to add -Xclang=3D-ffp-contract=3Dfast-honor-pragmas (https://discourse.llvm.org/t/fp-contract-fast-and-pragmas/58529). --=20 =E5=AE=8B=E6=96=B9=E7=9D=BF