Navigation Menu

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
Milestone

Comments

@randall77
Copy link
Contributor

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
Copy link

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
Copy link

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 pushed 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 pushed 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>
@golang golang locked and limited conversation to collaborators Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants