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: x+0 != x if x is float -0. #27718

Closed
randall77 opened this issue Sep 17, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@randall77
Copy link
Contributor

commented Sep 17, 2018

We need to make sure we don't do the optimization x+0 -> x for floats, because it doesn't work when x is negative zero.

This bug started with 1.8.
CL: https://go-review.googlesource.com/c/go/+/24790

@randall77 randall77 self-assigned this Sep 17, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Sep 17, 2018

Change https://golang.org/cl/135701 mentions this issue: cmd/compile: don't do floating point optimization x+0 -> x

@odeke-em odeke-em added this to the Go1.12 milestone Sep 17, 2018

@gopherbot gopherbot closed this in c6118af Sep 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.