[PATCH] D151834: Include math-errno with fast-math

2023-09-14 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. In D151834#4645910 , @zahiraam wrote: > In D151834#4645866 , @uabelho wrote: > >> What's the way forward here? Revert if it's unclear what to do? > > We have a fix for it. By eod a PR will

[PATCH] D151834: Include math-errno with fast-math

2023-09-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4645866 , @uabelho wrote: > What's the way forward here? Revert if it's unclear what to do? We have a fix for it. By eod a PR will be created. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D151834: Include math-errno with fast-math

2023-09-14 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. What's the way forward here? Revert if it's unclear what to do? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 ___ cfe-commits mailing

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. In D151834#4644692 , @zahiraam wrote: > [...] >> I think the issue comes from here: >> https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGBuiltin.cpp#L2365 > > This looks like it's happening only for -Oi (i>=1)

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4644422 , @zahiraam wrote: > In D151834#4644394 , @aaron.ballman > wrote: > >> In D151834#4644391 , @zahiraam >> wrote: >> >>> In D1

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4644394 , @aaron.ballman wrote: > In D151834#4644391 , @zahiraam > wrote: > >> In D151834#4644378 , >> @aaron.ballman wrote: >> >>>

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151834#4644391 , @zahiraam wrote: > In D151834#4644378 , @aaron.ballman > wrote: > >> In D151834#4644375 , @zahiraam >> wrote: >> >>>

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4644378 , @aaron.ballman wrote: > In D151834#4644375 , @zahiraam > wrote: > >> In D151834#4644373 , >> @aaron.ballman wrote: >> >>>

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151834#4644375 , @zahiraam wrote: > In D151834#4644373 , @aaron.ballman > wrote: > >> In D151834#4643925 , @uabelho >> wrote: >> >>> H

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4644373 , @aaron.ballman wrote: > In D151834#4643925 , @uabelho wrote: > >> Hi @zahiraam , >> >> I have a couple of downstream testcases that fail with this patch. >> Before >

[PATCH] D151834: Include math-errno with fast-math

2023-09-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151834#4643925 , @uabelho wrote: > Hi @zahiraam , > > I have a couple of downstream testcases that fail with this patch. > Before > > > clang bbi-86364.c -lm -O3 > > ./a.out > > passed but with the patch the assert i

[PATCH] D151834: Include math-errno with fast-math

2023-09-11 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi @zahiraam , I have a couple of downstream testcases that fail with this patch. Before > clang bbi-86364.c -lm -O3 > ./a.out passed but with the patch the assert in the program fails: a.out: bbi-86364.c:9: int main(): Assertion `(*__errno_location ()) == 33' f

[PATCH] D151834: Include math-errno with fast-math

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4642195 , @thakis wrote: > This breaks check-clang on macOS: http://45.33.8.238/macm1/68762/step_7.txt > > Please take a look and revert for now if it takes a while to fix. I have a fix for it here: https://reviews.ll

[PATCH] D151834: Include math-errno with fast-math

2023-09-08 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks check-clang on macOS: http://45.33.8.238/macm1/68762/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.or

[PATCH] D151834: Include math-errno with fast-math

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2c93e3c1c8ba: Take math-errno into account with '#pragma float_control(precise,on)' and (authored by zahiraam). Repository: rG LLVM Github Monorep

[PATCH] D151834: Include math-errno with fast-math

2023-09-07 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 556141. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptions.def clan

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor accepted this revision. andrew.w.kaylor added a comment. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. @andrew.w.kaylor Would you mind taking a last look at this before I can push this, please? I got the thumbs up from Aaron. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 556057. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptions.def clan

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151834#4639600 , @zahiraam wrote: > In D151834#4639536 , @aaron.ballman > wrote: > >> LGTM, but please add a release note describing the changes when you land >> them. > > @aar

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D151834#4639536 , @aaron.ballman wrote: > LGTM, but please add a release note describing the changes when you land them. @aaron.ballman thanks for the reviews. Added some note in the RN, let me know if that is enough. CH

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 556029. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptions.def clan

[PATCH] D151834: Include math-errno with fast-math

2023-09-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but please add a release note describing the changes when you land them. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834

[PATCH] D151834: Include math-errno with fast-math

2023-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/UsersManual.rst:1727 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=on``). This is the default behavior. + * ``pr

[PATCH] D151834: Include math-errno with fast-math

2023-08-01 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/docs/LanguageExtensions.rst:4702 +optimizations are enabled in the section of code governed by the pragma. +Effectively ``-ffast-math`` is enabled and ``-ffp-contract=fast``. This pragam +disables ``-fmath-errno``. ---

[PATCH] D151834: Include math-errno with fast-math

2023-08-01 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 546055. zahiraam marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/docs/LanguageExtensions.rst clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptio

[PATCH] D151834: Include math-errno with fast-math

2023-08-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:4698 ``-ffast-math`` is disabled and ``-ffp-contract=on`` -(fused multiply add) is enabled. +(fused multiply add) is enabled. This pragam enables ``-fmath-errno``. + ==

[PATCH] D151834: Include math-errno with fast-math

2023-07-31 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 545666. zahiraam marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/docs/LanguageExtensions.rst clang/docs/UsersManual.rst clang/include/clang/Basic/FPOptio

[PATCH] D151834: Include math-errno with fast-math

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2313-2315 + // Math intrinsics are generated only when math-errno is disabled. Any pragma + // or attribute that affect math-errno, should prevent or allow math + // intrincs to be generated. Intr

[PATCH] D151834: Include math-errno with fast-math

2023-07-27 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 544893. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCal

[PATCH] D151834: Include math-errno with fast-math

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2321-2328 + if ((FD->hasAttr() && !ErrnoOverriden && !OptNone) || ((ConstWithoutErrnoAndExceptions || ConstWithoutExceptions) && - (!ConstWithoutErrnoAndExceptions || (!getLangOpts().Ma

[PATCH] D151834: Include math-errno with fast-math

2023-07-27 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2321-2328 + if ((FD->hasAttr() && !ErrnoOverriden && !OptNone) || ((ConstWithoutErrnoAndExceptions || ConstWithoutExceptions) && - (!ConstWithoutErrnoAndExceptions || (!getLangOpts().MathErr

[PATCH] D151834: Include math-errno with fast-math

2023-07-27 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 544745. zahiraam marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/Code

[PATCH] D151834: Include math-errno with fast-math

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2321-2328 + if ((FD->hasAttr() && !ErrnoOverriden && !OptNone) || ((ConstWithoutErrnoAndExceptions || ConstWithoutExceptions) && - (!ConstWithoutErrnoAndExceptions || (!getLangOpts().Ma

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 544084. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCal

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2321-2328 + if ((FD->hasAttr() && !ErrnoOverriden && !OptNone) || ((ConstWithoutErrnoAndExceptions || ConstWithoutExceptions) && - (!ConstWithoutErrnoAndExceptions || (!getLangOpts().MathErr

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 2 inline comments as done. zahiraam added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:857 setAllowApproxFuncOverride(!Value); +setMathErrnoOverride(Value); if (Value) aaron.ballman wrote: > zahiraam wrote: >

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:29 OPTION(Float16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno,

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:29 OPTION(Float16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno, bool,

[PATCH] D151834: Include math-errno with fast-math

2023-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: efriedma. aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:29 OPTION(Float16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionK

[PATCH] D151834: Include math-errno with fast-math

2023-07-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Review anyone please? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[PATCH] D151834: Include math-errno with fast-math

2023-07-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/test/CodeGen/math-errno.c:28 +// FAST-LABEL: define dso_local nofpclass(nan inf) float @f1 +// FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan inf) {{.*}}) #[[ATTR3_FAST:[0-9]+]] +// a

[PATCH] D151834: Include math-errno with fast-math

2023-07-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 542141. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCal

[PATCH] D151834: Include math-errno with fast-math

2023-07-13 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 539961. zahiraam marked 6 inline comments as done and an inline comment as not done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Ba

[PATCH] D151834: Include math-errno with fast-math

2023-06-13 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2249 + // MSVC takes into account math-errno when compiling at -O2 level in + // the presence of a '#pragma float_control precise(on/off)'. Since we handle "#pragma float_contr

[PATCH] D151834: Include math-errno with fast-math

2023-06-09 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:30 OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno, bool, 1, BFloat16ExcessPrecision) #undef OPTION andrew.w.kaylor wrote:

[PATCH] D151834: Include math-errno with fast-math

2023-06-09 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 530040. zahiraam marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/Code

[PATCH] D151834: Include math-errno with fast-math

2023-06-02 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:30 OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno, bool, 1, BFloat16ExcessPrecision) #undef OPTION Does this mean M

[PATCH] D151834: Include math-errno with fast-math

2023-06-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 527950. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCal

[PATCH] D151834: Include math-errno with fast-math

2023-05-31 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam created this revision. zahiraam added reviewers: andrew.w.kaylor, jcranmer-intel. Herald added a project: All. zahiraam requested review of this revision. Herald added a project: clang. MSVC includes math-errno with #pragma float_control(precise,on) at O2