-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Disable sqrtf vectorization for GCC 15 #18975
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 9d7ab0e.
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.
Based on the Bugzilla thread linked in the other issue, I think we should just disable the declarations for all of the functions under GCC, as only removing the declartion for the one currently causing problems leaves latent issus for the future.
I fully agree with @ralfbrown |
Sure. This PR is just to undo the previous workaround and have a better/cleaner starting point. As mentioned in the bug report, someone also needs to check what's hapenning w/ Clang+glibc as it also defines |
@jenshannoschwalm @ralfbrown @kmilos |
I would prefer @ralfbrown suggestion in #18729 leaving optimizing to whats available.
|
Again, the original bug seems to be glibc specific, not GCC specific. On top of that, there is musl, BSD libc, etc., and all those combine w/ GCC and Clang. I cannot be 100% confident what you propose is the "final" fix, as I don't have access to all of those platforms, nor the time to test all. If you and @ralfbrown are, please feel free to follow up w/ direct code suggestions, commits to a fork of my branch, or a subsequent PR (my preference after merging this one). |
FWIW, these are available in
fabsf needs to be excluded as well... |
I am absolutely no compiler expert but from what i understood we should trust the compiler using available functions for vectorizing if possible. Not rying to enforce something not being there, otherwise lot's of secific test cases. |
I guess, because it should know what C lib/math lib it's built with?
I suspect they are not able to auto-vectorize everything identically, so that's why I say I'm not 100% sure. |
Not sure either but it's likely the very best guess? |
For me quite the opposite - as we've learned even the same compiler vectorizes differently between its versions, and also depending on (unknown) options.. |
Which is precisely why we shouldn't try to force the use of vectorized stdlib functions. |
As references see darktable-org#18729 darktable-org#18975 and https://bugzilla.redhat.com/show_bug.cgi?id=2362561 see late comments there from Jakub Jelinek https://bugzilla.redhat.com/show_bug.cgi?id=2368336 https://bugzilla.redhat.com/show_bug.cgi?id=2373291
As references see darktable-org#18729 darktable-org#18975 and https://bugzilla.redhat.com/show_bug.cgi?id=2362561 see late comments there from Jakub Jelinek https://bugzilla.redhat.com/show_bug.cgi?id=2368336 https://bugzilla.redhat.com/show_bug.cgi?id=2373291
Alternative (more maintainable?) workaround for #18729