[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-05-11 Thread xiongji90 via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. xiongji90 marked an inline comment as done. Closed by commit rG2ed77846a916: This patch adds doc for __builtin_flt_rounds and __builtin_set_flt_rounds (authored by xiongji90). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-05-08 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 marked an inline comment as done. xiongji90 added a comment. Hi, @rjmccall I updated the patch to address your previous comments, could you help review again? Thanks very much. Comment at: clang/docs/LanguageExtensions.rst:3272 +3 - toward negative infinity +4 -

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-05-08 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 520288. xiongji90 added a comment. Address previous comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146188/new/ https://reviews.llvm.org/D146188 Files: clang/docs/LanguageExtensions.rst

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-28 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D146188#4224902 , @rjmccall wrote: > In D146188#4223249 , @xiongji90 > wrote: > >> Hi, @rjmccall and @sepavloff >> In UserManual, we include a section `Controlling Floating Point

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-28 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 508925. xiongji90 added a comment. Add floating point environment section in UserManual.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146188/new/ https://reviews.llvm.org/D146188 Files:

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-27 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. Hi, @rjmccall and @sepavloff In UserManual, we include a section `Controlling Floating Point Behavior`: https://github.com/llvm/llvm-project/blob/main/clang/docs/UsersManual.rst#controlling-floating-point-behavior , now we need to add a new section for floating-point

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-21 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3288 +This builtin is restrcted to work on x86 and arm targets currently. When support +for the builtin is added for new targets, the manual should be updated accordingly. +

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-20 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 506475. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146188/new/ https://reviews.llvm.org/D146188 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-20 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 506472. xiongji90 added a comment. Combine description of __builtin_flt_rounds and __builtin_set_flt_rounds Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146188/new/ https://reviews.llvm.org/D146188 Files:

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-19 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3295 +support this builtin. Since this builtin changes default floating-point +environment, ``#pragma STDC FENV_ACCESS ON`` is required. + rjmccall wrote: > sepavloff wrote: > > Not

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-19 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 506460. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146188/new/ https://reviews.llvm.org/D146188 Files: clang/docs/LanguageExtensions.rst Index: clang/docs/LanguageExtensions.rst

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-15 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 created this revision. xiongji90 added reviewers: rjmccall, sepavloff, aaron.ballman, andrew.w.kaylor. Herald added a project: All. xiongji90 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch aims to add necessary

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-14 Thread xiongji90 via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. xiongji90 marked an inline comment as not done. Closed by commit rGb38aa2971711: Add __builtin_set_flt_rounds (authored by xiongji90). Changed prior to commit:

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-14 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D145765#4189153 , @aaron.ballman wrote: > Thanks for the additional tests! Can you also add a release note to > `clang/docs/ReleaseNotes.rst` and document the new builtin in > `clang\docs\LanguageExtensions.rst`? Hi,

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-14 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 504957. xiongji90 marked an inline comment as done. xiongji90 added a comment. Simplify test and update release doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145765/new/ https://reviews.llvm.org/D145765

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-12 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 504508. xiongji90 added a comment. Add SemaChecking test for incompatible input arguments for __builtin_set_flt_rounds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145765/new/

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-12 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 marked an inline comment as done. xiongji90 added inline comments. Comment at: clang/test/CodeGen/builtin_set_flt_rounds.c:5-7 +void test_builtin_set_flt_rounds() { + __builtin_set_flt_rounds(1); + // CHECK: call void @llvm.set.rounding(i32 1)

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-12 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 504504. xiongji90 added a comment. Add semachecking test for unsupported platform. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145765/new/ https://reviews.llvm.org/D145765 Files:

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-09 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. Hi, @andrew.w.kaylor @rjmccall @sepavloff @aaron.ballman This patch re-lands previous patch to add __builtin_set_flt_rounds, previous patch broke PPC64 buildbot due to test case bug. Previously, tests for __builtin_set_flt_rounds was located in CodeGen/builtin.c

[PATCH] D145765: Add __builtin_set_flt_rounds

2023-03-09 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 created this revision. xiongji90 added reviewers: andrew.w.kaylor, rjmccall, sepavloff, aaron.ballman. Herald added subscribers: pengfei, kristof.beyls. Herald added a project: All. xiongji90 requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-08 Thread xiongji90 via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24b823554acd: Add __builtin_set_flt_rounds (authored by xiongji90). Changed prior to commit: https://reviews.llvm.org/D144454?vs=502507=503602#toc Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-06 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. Hi, @sepavloff Do you have any concern about this patch? Thanks very much. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 ___

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-06 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. Hi, @rjmccall and @sepavloff I updated built name to "__builtin_set_flt_rounds" as suggested and restrict the built to be used on x86, arm, aarch64 target. I did my local test on x86 and x86_64 and found arm and aarch64 code gen have already supported

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-05 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 502507. xiongji90 added a comment. Update the builtin name to __builtin_set_flt_rounds and restrict it to be used only on x86, x86_64, arm, aarch64 target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-02 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D144454#4163688 , @rjmccall wrote: > I see. If we're going to take the target-independent values specified by > `FLT_ROUNDS`, then the original builtin name is more appropriate. Of course, > this has the disadvantage of

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-01 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D144454#4163658 , @sepavloff wrote: > C standard function `fesetround` accepts rounding mode in the form of > target-specific values like `FE_TONEAREST`. They usually represent > corresponding bits in control register, so

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-01 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D144454#4162129 , @rjmccall wrote: > In D144454#4157717 , @xiongji90 > wrote: > >> In D144454#4142253 , @rjmccall >> wrote: >> >>> New

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-01 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 501732. xiongji90 added a comment. Change the builtin name to __builtin_fesetround Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 Files:

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-01 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D144454#4142253 , @rjmccall wrote: > New builtins should be documented in the user manual. > > There are standard pragmas for changing the rounding mode, right? What's the > interaction between the ability to set this

[PATCH] D144454: Add builtin for llvm set rounding

2023-02-28 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 updated this revision to Diff 501389. xiongji90 added a comment. Update test for llvm.set.rounding Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 Files:

[PATCH] D144454: Add builtin for llvm set rounding

2023-02-28 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 added a comment. In D144454#4142253 , @rjmccall wrote: > New builtins should be documented in the user manual. > > There are standard pragmas for changing the rounding mode, right? What's the > interaction between the ability to set this

[PATCH] D144454: Add builtin for llvm set rounding

2023-02-21 Thread xiongji90 via Phabricator via cfe-commits
xiongji90 created this revision. Herald added a project: All. xiongji90 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. llvm.get.rounding and llvm.set.rounding have been added to llvm and for llvm.get.rounding, a corresponding builtin