-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
fix bugzilla Issue 24819 - Optimizer changes result of float calculat… #17023
Conversation
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#17023" |
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.
Shouldn't the test case have -O
as an argument?
Also this is a "major" issue, did you want to target stable for it?
I thought it was good to test every combination.
@dkorpel is working with a customer on this, so I'll let him make that call. (It's been there a very long time.) |
Isn't that what permute args is for?
Fair |
The default permute set is (-inline -release -g -O), so -O doesn't need to be added manually. |
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.
Thanks! Did you find out why the sqrt instruction disappears with the x ^ signbit
optimization? I hope there's no other latent bugs with integer optimizations on floating point math.
Yes but there is no |
Many thanks for working on this, guys! I know we are probably the last bunch that need x87 to work correctly. |
With default I mean that even without any |
No, I just went with the elem tree was malformed. |
That optimization was a relic of the old no-x87 CPUs. |
This fix is important to us. Does it help if I make a PR to the stable branch with a cherry pick of this commit, or does that only add to your workload, @ibuclaw? Is master going to be merged into stable before the next beta release? (Edit: there is another change in master that will benefit us as well: #16780). It would be good to have an approximate ETA of the next release. If that is months from now, we would have to decide between two unpopular options: 1. to use the nightly build, putting us on master, or 2. build our own compiler, possibly missing out on PGO. In both cases we mess up our system for reproducible builds (which relies on official version tags and the release archive). |
No. If you want them in the next release, please cherrypick this and #16780 onto |
…ions on 32-bit (dlang#17023) (cherry picked from commit 88d1e8f)
…ions on 32-bit
Thanks to @dkorpel for zeroing in on the problem.