Skip to content

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

@randall77

Description

@randall77

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions