[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-09 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. This patch had to be reverted because SPEC2006 and SPEC2017 are failing. More information here: https://bugs.llvm.org/show_bug.cgi?id=51346 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-05 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. FWIW, fp-contract=on has been the documented default for clang since version 5. https://releases.llvm.org/5.0.1/tools/clang/docs/ClangCommandLineReference.html#cmdoption-clang-ffp-contract This change just brought the behavior into conformance with the

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Files bug to edit the release not as suggested by @xbolva00 here: https://bugs.llvm.org/show_bug.cgi?id=51347 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. In D74436#2926385 , @tstellar wrote: > Can someone file a bug for this and put release-13.0.0 in the blocks field so > we can track it? Filed https://bugs.llvm.org/show_bug.cgi?id=51346 . Repository: rG LLVM Github Monorepo

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Can someone file a bug for this and put release-13.0.0 in the blocks field so we can track it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I see that the UserManual has been updated, but this behavior change should probably also be mentioned in the Release Notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a subscriber: kbsmith1. mibintc added a comment. There was a long discussion on cfe-dev about this issue approximately January-February 2020 including @scanon @andrew.w.kaylor and many others. While there wasn't 100% consensus to move to ffp-contract=on there are many reasons to

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a subscriber: tstellar. hans added a comment. Also +@tstellar since I believe this went in before the 13 branch point. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-03 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. Can we revert this patch please? If I understood correctly, this patch changed the default behavior of clang when generating code for float point arithmetic. After this patch `-ffp-contract` was set to on if this flag was not specified. In theory this makes clang use

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. It looks like this patch is also causing mis-compares in both SPEC2006 and SPEC2017 on AArch64, e.g. in `External/SPEC/CFP2006/453.povray/`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D74436#2917395 , @mibintc wrote: > In D74436#2917357 , @haowei wrote: > >> We are seeing float related unit tests failing in Fuchsia after this patch. >> What flags should we add to our

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Seems like lnt related things are stable now so maybe it is a good time to update release notes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-07-30 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D74436#2917357 , @haowei wrote: > We are seeing float related unit tests failing in Fuchsia after this patch. > What flags should we add to our build to match llvm's previous float point > behavior? This option:

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-07-30 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. We are seeing float related unit tests failing in Fuchsia after this patch. What flags should we add to our build to match llvm's previous float point behavior? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-07-27 Thread Melanie Blower via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG48ad446a0fb2: [clang][fpenv][patch] Change clang option -ffp-model=precise to select ffp… (authored by mibintc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-07-22 Thread Melanie Blower via Phabricator via cfe-commits
mibintc reopened this revision. mibintc added a comment. This revision is now accepted and ready to land. I had to revert again, it's still failing on Intel buildbots. Cannot reproduce on Intel-internal Broadwell server. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-07-22 Thread Melanie Blower via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb9b696bba670: [clang][fpenv][patch] Change clang option -ffp-model=precise to select ffp… (authored by mibintc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-06-19 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. I’ve been trying to commit this patch. However, when I commit, the tests fail some 21 floating point tests in LNT. Also there is both performance improvement as well as regression which shouldn’t happen because the sum total of my clang patch + my LNT patch should

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-06-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. The bot is showing a fail due to this patch, see https://lab.llvm.org/buildbot#builders/110/builds/4007 It looks like my updates to LNT earlier this week haven't been migrated to the bot, is that right? See

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-06-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/UsersManual.rst:1501 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior. + *

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-06-10 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/docs/UsersManual.rst:1501 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior. + *

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-06-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/UsersManual.rst:1501 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior. + *

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-06-10 Thread Melanie Blower via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8daac3714083: [clang][FPEnv] Clang floatng point model ffp-model=precise enables ffp… (authored by mibintc). Changed prior to commit: https://reviews.llvm.org/D74436?vs=345526=351156#toc Repository:

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-27 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a subscriber: lebedev.ri. mibintc added a comment. In D74436#2785730 , @lebedev.ri wrote: > No real comments from me. > I assume, the errors are because `-ffp-contract=on` actually results in > *less* error? Yes, FMA improves accuracy,

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri resigned from this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. No real comments from me. I assume, the errors are because `-ffp-contract=on` actually results in *less* error? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-27 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. Hoping @lebedev.ri will take a look since he requested changes, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 ___ cfe-commits

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-20 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. I created https://reviews.llvm.org/D102861 to make changes to the failing LNT tests. Hoping to push this commit after the test changes in D102862 are approved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-20 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D74436#2190566 , @lebedev.ri wrote: > In D74436#2190492 , @lebedev.ri > wrote: > >> <...> > > And by codegen changes i mostly mean newly-set/now-unset fp fast-math > instruction flags.

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-14 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. There are 3 clang settings for ffp-contract (on, off, fast) but the FMF bits have only "allow contract". Clang sets the "allow contract" bit in the IRBuilder only when ffp-contract=fast Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-05-14 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 345526. mibintc added a comment. I rebased and enhanced the test case clang/test/CodeGen/ffp-contract-option.c to show the effect of various ffp-contract={on,fast,off} * ffast-math=on,off in response to the request from @lebedev.ri ; sorry for leaving

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-12-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Status? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-08-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D74436#2190492 , @lebedev.ri wrote: > <...> And by codegen changes i mostly mean newly-set/now-unset fp fast-math instruction flags. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-08-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. In D74436#2190422 , @fhahn wrote: > IIUC the patch is currently reverted (in > 78654e8511cf16d49f6680d782f3771a767ba942 >

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 282577. fhahn added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 Files: clang/docs/UsersManual.rst clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn reopened this revision. fhahn added a comment. This revision is now accepted and ready to land. IIUC the patch is currently reverted (in 78654e8511cf16d49f6680d782f3771a767ba942 ), due to ~20 llvm-test-suite failures.

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Perhaps we can also see what the defaults are for GCC and unify with those? +1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In D74436#1875315 , @nemanjai wrote: > > You're right, -O0 shouldn't generate FMA. I'm preparing to revert this now > > -- just verifying the build. > > Perhaps this should be > `off` with no optimization > `on` with

RE: [PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Jinsong Ji via cfe-commits
sepavl...@gmail.com > Cc: mask...@google.com; j...@us.ibm.com; david.bolvan...@gmail.com; > mar...@martin.st; Wang, Pengfei ; > wuz...@cn.ibm.com; nemanja.i....@gmail.com; kit.bar...@gmail.com; cfe- > comm...@lists.llvm.org; mlek...@skidmore.edu; blitzrak...@gmail.com; > shen...@google.com; peter.wal

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. > We normally default to `-ffp-contract=on ` only for -O3 and above (for legacy > compilers XL/gcc on PowerPC). Correction: XL on PowerPC default to generate FMA at -O0 as well. The corresponding option is -qfloat=maf.

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yeah, I agree with Steve here. The great virtue of `-ffp-contract=on` over the more aggressive modes is that FMA formation is purely local to a single source expression, which means there's really no obstacle to treating it as implementation-guaranteed semantics.

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a subscriber: scanon. andrew.w.kaylor added a comment. In D74436#1875320 , @mibintc wrote: > However you are right we don't want the frontend to create FMA when > optimizations are disabled -O0 I've been discussing this with

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. In D74436#1875320 , @mibintc wrote: > @jsji Will your backend tolerate -ffp-contract=on if optimizations are not > disabled, e.g. -O2? We are proposing that the default floating point model > be -ffp-model=precise, and with

RE: [PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-14 Thread Blower, Melanie I via cfe-commits
.@skidmore.edu; blitzrak...@gmail.com; > shen...@google.com; peter.wal...@arm.com > Subject: [PATCH] D74436: Change clang option -ffp-model=precise to select ffp- > contract=on > > andrew.w.kaylor added a subscriber: MaskRay. > andrew.w.kaylor added a comment. > > In D744

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a subscriber: MaskRay. andrew.w.kaylor added a comment. In D74436#1875386 , @thakis wrote: > The revert of this breaks tests everywhere, as far as I can tell. It looks like something strange happened with the revert: > clang-11:

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The revert of this breaks tests everywhere, as far as I can tell. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 ___ cfe-commits

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. @jsji Will your backend tolerate -ffp-contract=on if optimizations are not disabled, e.g. -O2? We are proposing that the default floating point model be -ffp-model=precise, and with precise model, the ffp-contract=on. However you are right we don't want the frontend

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. > You're right, -O0 shouldn't generate FMA. I'm preparing to revert this now -- > just verifying the build. Perhaps this should be `off` with no optimization `on` with `-O1/-O2/-O3/-Os/-Oz` `fast` with fast math Just a suggestion, I'm not sure whether that would be

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D74436#1875273 , @jsji wrote: > This is also breaking test-suites in our internal buildbots .. > > This change is actually changing the default behavior: if user does NOT > supply `-ffp-contract`, it becomes

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. This is also breaking test-suites in our internal buildbots .. This change is actually changing the default behavior: if user does NOT supply `-ffp-contract`, it becomes `-ffp-contract=on`. So this means any code without explicitly add `-ffp-contract=off` will have

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Looks like this patch regressed the test-suite: https://lnt.llvm.org/db_default/v4/nts/recent_activity Now 45min+ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. FYI this caused failed builds for aarch64 (when building with `-fno-signed-zeros`), hitting unreachable statements in TargetLowering::getNegatedExpression - see https://bugs.llvm.org/show_bug.cgi?id=44892. I guess that's a bug in the aarch64 backend and not with this

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-12 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-12 Thread Melanie Blower via Phabricator via cfe-commits
mibintc marked 2 inline comments as done. mibintc added a comment. some replies to Andy. I'll upload another patch here which passed check-all locally. then i'll re-commit it. Comment at: clang/docs/UsersManual.rst:1388 - * ``precise`` Disables optimizations that are not

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-12 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 244178. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 Files: clang/docs/UsersManual.rst clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/ppc-emmintrin.c

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-11 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/docs/UsersManual.rst:1388 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior. *

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-11 Thread Melanie Blower via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mibintc marked 2 inline comments as done. Closed by commit rG3fcdf2fa945a: Change clang option -ffp-model=precise to select ffp-contract=on (authored by mibintc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-02-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I agree that the default mode should be standards-compliant, which I believe permits `fp-contract=on` (contraction within expressions) but not `fp-contract=fast` (arbitrary contraction). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION