-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove unneeded static_cast for xexp #3083
Conversation
We can just check for 0 since -0 is just 0
Thanks!
|
I was actually considering making xexp an integer. All the tests pass if we make xexp an integer in this case and would certainly be faster to work on for RISC processors while also avoiding the problems of potentially needing casts. However, I'm worried about tiny edge cases as I can't prove that at this point in execution, xexp is in range of a short, which would thereby change behavior, or if said behavior does change, whether such a change would have any adverse effect on the runtime. So I decided to play it safe. |
Agreed, thanks. I've pushed an additional commit, as I remembered to check for additional affected locations (the float/double codepaths are often similar like this). Double-checked that the change is still safe and desirable here. |
Is there other files with similar code as well? |
I searched for other files and I think we've got them all now, although I could have missed something. |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for this code cleanup! 😸 😸 |
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
We can just check for 0 since -0 is just 0