Skip to content
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

cmd/compile: take into account that floating point special cases (NaN, Inf) are unlikely #25125

mundaym opened this issue Apr 27, 2018 · 2 comments


Copy link

@mundaym mundaym commented Apr 27, 2018

math.IsNaN and math.IsInf are very unlikely to return true. It would be nice to use this information for code layout.

I have hacked together a prototype using SSA rules but there is probably a better way to do it. The prototype is here: Feel free to take that and improve it.

Copy link

@josharian josharian commented Apr 27, 2018

Haven't looked at the CL, but naively it seems like the likelyadjust pass is the right place to do this.


Copy link

@bcmills bcmills commented Apr 27, 2018

I would certainly believe that math.IsNaN is usually false. I suspect that math.IsInf depends on the application.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants