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: wrong calculation result for bit operation that's inlined and has all constant shifts in rewrite rules [1.11 backport] #32711

Closed
gopherbot opened this issue Jun 20, 2019 · 2 comments
Assignees
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 20, 2019

@dr2chase requested issue #32680 to be considered for backport to the next 1.11 minor release.

@gopherbot please open backport issues. It technically fails the regression policy (been broken too long -- probably since 1.9) but it is a silent bad code problem which is very bad, and the fix is very low risk.

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Jun 20, 2019

Change https://golang.org/cl/183242 mentions this issue: [release-branch.go1.11] cmd/compile: add necessary operand to mergePoint in rewrite rules

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Jul 8, 2019

Closed by merging c6e3b48 to release-branch.go1.11.

@gopherbot gopherbot closed this Jul 8, 2019
gopherbot pushed a commit that referenced this issue Jul 8, 2019
…int in rewrite rules

A missing operand to mergePoint caused lower to place values
in the wrong blocks.

Includes test, belt+suspenders to do both ssa check and verify
the output (was is how the bug was originally observed).

The fixed bug here is very likely present in Go versions
1.9-1.12 on amd64 and s390x

Updates #32680.
Fixes #32711.

Change-Id: I63e702c4c40602cb795ef71b1691eb704d38ccc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/183059
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 769fda2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/183242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.