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 · 2 comments
Closed

cmd/compile: x+0 != x if x is float -0. #27718

randall77 opened this issue Sep 17, 2018 · 2 comments
Assignees
Milestone

Comments

@randall77
Copy link
Contributor

@randall77 randall77 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

@gopherbot gopherbot 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
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Aug 20, 2019

Change https://golang.org/cl/190937 mentions this issue: test/fixedbugs: add more test cases to issue #27718

gopherbot pushed a commit that referenced this issue Aug 28, 2019
This CL add test cases for the unary FP negative
operation.

Change-Id: I54e7292ca9df05da0c2b113adefc97ee1e94c6e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/190937
Run-TryBot: Ben Shi <powerman1st@163.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
tomocy added a commit to tomocy/go that referenced this issue Sep 1, 2019
This CL add test cases for the unary FP negative
operation.

Change-Id: I54e7292ca9df05da0c2b113adefc97ee1e94c6e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/190937
Run-TryBot: Ben Shi <powerman1st@163.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
t4n6a1ka added a commit to t4n6a1ka/go that referenced this issue Sep 5, 2019
This CL add test cases for the unary FP negative
operation.

Change-Id: I54e7292ca9df05da0c2b113adefc97ee1e94c6e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/190937
Run-TryBot: Ben Shi <powerman1st@163.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.