-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Enable logf128 constant folding for hosts with 128bit long double #96287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4cc6905
Enable logf128 constant folding for AArch64
MDevereau 97a0b20
Remove aarch64 constraint
MDevereau 94c6914
Enable optimization without opt-in
MDevereau 422fed8
Check for viable logf128 and use that for float128's typedef
MDevereau 613f6a4
Remove cmake tests
MDevereau 5705316
Lit uses LLVM_HAS_LOGF128 to run tests and is no longer a command lin…
MDevereau 6ceda72
Remove check for __LDBL_MANT_DIG__
MDevereau cc0a937
Merge branch 'main' into aarch64-logf128
MDevereau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the check for
__LDBL_MANT_DIG__necessary with the current version?Otherwise, this approach seems fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I was suggesting LDBL_MANT_DIG with the old version that explicitly wrote out the type "long double". It should be safe to assume that if logf128 returns a long double, then long double is actually an IEEE 128-bit float.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late update, I've been away for a few weeks. I believe its unnecessary in this version, if
HAS_LOGF128is true the logf128 function prototype should return a valid IEEE 128-bit float.I believe this will expose a problem I've seen where x86 targets with fp80 will return a slightly different result from AArch64. I.e., AArch64's
0xL00000000000000007FFF800000000000vs x86's0xL0000000000000000FFFF800000000000for the Constant folding test log_e_negative_infinity and a few others. I'm not sure if this is due to a target specific implementation of logf128 currently.